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 / March 2005

Tip: Looking for answers? Try searching our database.

OnChange Event and Debug

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GeorgieGirl - 24 Mar 2005 19:39 GMT
I have a form with a subform.  The "Vendor" on the subform defaults to the
"Vendor" on the Main form (Vendor default = Parent!Vendor).  The "Vendor" on
the subform is a combo box.
The OnChange event of the subform.Vendor calls a Macro that has two
conditional statements that should either set a value of "3" in the
subform.status when the subform.Vendor <> the Parent!Vendor, or set the
subform.status to a value of "1" if the subform.Vendor = Parent!Vendor.
When the form comes up the subform.vendor is defaulted correctly to match
the "Vendor" on the main form.  Upon selecting a different Vendor from the
subform.vendor combo box, the macro runs and sets the correct value of 3 in
the subform.status control.  If I change the subform.vendor combobox back to
the original Vendor that matches the Main form, it does not change the
subform.status to a 1.  Single stepping the macro shows that it is evaluating
the condition as "false" even though the form is showing that the Vendor in
both the Main and subform are a match.
I have never used debug before, but tried that to get the value of the
OnChange control, but I do not have an example for a main and subform and
cannot get the syntax correct.
Any ideas why this is evaluating to false when the Vendor control is changed
a second time?
GeorgieGirl - 25 Mar 2005 16:17 GMT
I did find an error in my conditional statement that was causing this to
evaluate to false.
However, for the future if anyone could help me with the syntax required by
Debug to look at a control on a subform it would be most helpful.

> I have a form with a subform.  The "Vendor" on the subform defaults to the
> "Vendor" on the Main form (Vendor default = Parent!Vendor).  The "Vendor" on
[quoted text clipped - 16 lines]
> Any ideas why this is evaluating to false when the Vendor control is changed
> a second time?
 
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.