Sync combo boxes in subform (1 Viewer)

B

buster

Guest
I am trying to syncronize two combo boxes in a subform. The data for each combo box is in a separate table and then linked to another table to hold that data. I can get it to work when the main form is not a subform using the ActiveForm command, but once I turn the main form into a subform, the ActiveForm does not work on a subform.
 

Travis

Registered User.
Local time
Yesterday, 23:49
Joined
Dec 17, 1999
Messages
1,332
Your right only Main forms can really be the active Form. You will need to reference the subform as a control of the Main Form like this:

ActiveForm.[SubFormName].Form.[ComboBox]
 
B

buster

Guest
Thank you I got that to work. The next question is. Do you know of a way to syncronize the two combo boxes and view the subform in datasheet view? When I do this, it only shows data in the second combo box if that record has the focus. Once I go to another record the second combo box blanks out. The data is still there it just does not show itself until that record gets the focus back.
 

Travis

Registered User.
Local time
Yesterday, 23:49
Joined
Dec 17, 1999
Messages
1,332
What is happening effects all versions of Access prior to Access 2000. When you change items on the form all visible items are changed. This is not something that can be coded for (at least I have not found a method for the 6 years I've been using Access)

I normally don't do any reformatting of RowSources or field color changes in a Datasheet view. I will make it single view to avoid the visual nightmare the reformatting causes.

but sometimes you just can't avoid this so...

What I do when I have to use datasheet or continous form and redo the row sources is to make the subform one record high. This way they can't see what the new visual effects do to the old record.

Hope this is helpful
 

Users who are viewing this thread

Top Bottom