Hi all,
I'm working on a form that will allow me to browse publications, sorted by a number called a TMIN. The combo box "ComboTMIN" navigates through records, and displays the current TMIN. However, it doesn't work so well when I try to add a record with a separate button, and then enter a value into the combo.
Info about this combo box --
Name: ComboTMIN
Row Source: SELECT [tbl_Publications].[TMIN] FROM tbl_Publications;
Row Source Type: Table/Query
Event - After Update: Embedded Macro: searches for first record where ="[TMIN] = " & "'" & [Screen].[ActiveControl] & "'"
Code used to display current record TMIN in combo box --
(Form - Event - On Current)
Private Sub Form_Current()
'Display current TMIN in combo box
Me.ComboTMIN = Me.TMIN
End Sub
New Record button -- just a basic button with an Embedded Macro -- GoToRecord - New.
The combo box works fine for navigation, and the New Record button successfully adds a record, but doesn't allow me to enter a TMIN for the new record. Once I type anything into the TMIN combo, of course, the After Update action searches for a matching record, doesn't find one, and I'm dumped back into the new record. (I can update all the other fields in the record.) I'm sure there's a way around this contradiction but I'm a bit stuck--any ideas? Thanks!