Save Record-Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a Combo Box to find a specific item. When I enter a new Item,
I would like this Item to immediately show in the Combo (Lookup) box when I
click the down arrow. Where would I enter the Event Procedure
"DoCmd.RunCommand acCmdSaveRecord" for this to happen?
Thanks for any help
 
Thanks for that but could you be a little more explicit. Do I use the code
you supplied with the SaveRecordcommand or?
Thanks again

Khoa said:
Put the code in the Form's After Update event:
[Combo Box Name].Requery

Roger Bell said:
I have created a Combo Box to find a specific item. When I enter a new Item,
I would like this Item to immediately show in the Combo (Lookup) box when I
click the down arrow. Where would I enter the Event Procedure
"DoCmd.RunCommand acCmdSaveRecord" for this to happen?
Thanks for any help
 
After adding new record, or edit a record ..., if you goto another record, or
just click the Record Selector, it will be saved. So you don't need to use
the Save Record command. The issue is that even the record has been saved,
but you can't see it in the Combo Box list, then you need to Requery the
Combo Box to Refresh it's list. This should be done in the Form After Update
event.
In case you still want to save record yourself, add a button on form, then
paste this in the On Click event:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Hope this is clear.

Roger Bell said:
Thanks for that but could you be a little more explicit. Do I use the code
you supplied with the SaveRecordcommand or?
Thanks again

Khoa said:
Put the code in the Form's After Update event:
[Combo Box Name].Requery

Roger Bell said:
I have created a Combo Box to find a specific item. When I enter a new Item,
I would like this Item to immediately show in the Combo (Lookup) box when I
click the down arrow. Where would I enter the Event Procedure
"DoCmd.RunCommand acCmdSaveRecord" for this to happen?
Thanks for any help
 
Back
Top