Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

Combo Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Duane - 22 May 2008 19:09 GMT
I have a combo box on an sub form cboPDOPID.  The row source is SELECT
tbl_Policy_Procedure.PDOPID, tbl_Policy_Procedure.PDOPName FROM
tbl_Policy_Procedure;

It is bound to column 1 which is an AutoNumber field in the table.  Columns
are 0;1.2".

I would like to be able to cancel the record if the user starts to enter a
record and then changes there mind.  As it is right now, once a value has
been selected and you remove the value, when you try to leave the field I
get an error message stating "You tired to assign a null value to a variable
that is not a Variant type".

Is there a way to do this.  I have tried the Undo Command on the Before
Update event of the combo box and the sub form, but I have not gotten it to
work.  If I put an Undo Button on my Toolbar that works, but I would like to
automatically undo the record so there is no error message.

Thanks in advance!
Jeff Boyce - 22 May 2008 20:13 GMT
Is there a chance that combobox is bound to a field in the table that
underlies the form?  It sounds like you are trying to change a value in a
table using the combobox.

You've described a "how" ... if you'll describe a bit more about why and
what, folks here may be able to offer more specific suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP

>I have a combo box on an sub form cboPDOPID.  The row source is SELECT
>tbl_Policy_Procedure.PDOPID, tbl_Policy_Procedure.PDOPName FROM
[quoted text clipped - 15 lines]
>
> Thanks in advance!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.