ComboBox

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

Guest

Hello
I have a combobox , and when i click on the box i wan't to:
1) save a record
2) goto a new record
3) goto a CONTROL
My code is like this:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl,,employee

The save and newrecord is ok
The control don't work.

By the way , i try to learn programming the hard way.
 
try

Me.Dirty = False 'Saves the record
DoCmd.GoToRecord , , acNewRec ' Goes to a new record
employee.setfocus 'sets focus to control named employee


The correction to your code sample is:

DoCmd.GoToControl "employee"

HTH, Graeme.
 
Back
Top