Syncronize combo box & subform

hyousef

Registered User.
Local time
Today, 10:22
Joined
Jan 15, 2002
Messages
41
I have a form with 3 syncronize comb boxes and a sub form. First thing i see when i open the form is the three combo boxes and then when i select the third combo box, the sub form appears with data that match my selection criteria...which is good. But if there is no data then the subform doesn't apeear.

What i want is, if there is no data then i want the sub form to appear with an empty records (fields) for addition.
Is it possiple to do that?

Note: Allow Addition property is set to yes.
 
Yes.
One way is to determine whether there are any matching records by using a Recordset. If rst.NoMatch then set the Data Entry property of the Subform to True.
Allow Additions will of course still need to be True.

Shep
 
Shep,
How to do that? I've never used recordset before.
 
How are you syncronizing the ComboBoxes, with Macros?
Using a Recordset will entail adding code behind your last ComboBox, as a minimum.
If you are comfortable with VBA this should be no problem for you. If not, you might want to cast about and find whether or not this can be done with Macros. I don't happen to know, as I don't use Macros.
I think it would be much easier to set this up for you than to explain in this forum. If you can send your database to me I would be happy to demonstrate how to do this.
My email address is in my profile.

Shep
 
Shep,
i just sent you the DB.
I am using MS Access 97.
Also, i am using queries not macros.
 

Users who are viewing this thread

Back
Top Bottom