Form blank until record selected from combo

kbrooks

Still learning
Local time
Today, 12:50
Joined
May 15, 2001
Messages
202
At the top of my form I have a combo box where the user can select which record they want to edit. This is a really minor thing, but is there a way for the form to open up blank, and only pull up a record once they select one? Currently, when the form opens, it's displaying the first record in the table.
 
When opening it:

Code:
DoCmd.OpenForm "MyForm", , , , acFormAdd


Or, in the actual form's Load event:

Code:
DoCmd.GotoRecord, , acNewRec
 
If it was me then I think I would have the combo box on one form for the user to select the record they want to amend, then create a second form containing all the details the user needs to see to amend. (including the field that is the property of the combo box on the other form)

Then on the first form put a command button to open the second form.
When you create this command button choose to find specific records to display, and then link by the record number.

This way when the user selects the record they want then need to click another button to retrieve all the details.

You could also try putting the second form as a subform of the first one. On exit of the Combo box you could requery for the details.

Hope this helps!
 
Although I dont understand it, Mile's answer would probably be more effective!:)
 
I, personally, would use nutty's suggestion.

I posted an example yesterday on this thread.
 
Well I used Mile's suggestion before seeing these other, and it works for my purposes. Thanks much!!
 
When opening it:

Code:
DoCmd.OpenForm "MyForm", , , , acFormAdd


Or, in the actual form's Load event:

Code:
DoCmd.GotoRecord, , acNewRec
is this VBA code or a Macro ? Very new to access - attempting to open a blank form and have someone select from the combo box to find the record to edit OR if no record matches the value to create a new record.
 

Users who are viewing this thread

Back
Top Bottom