views:

279

answers:

2

I have a continuous subform in an Access 2003 form. The first control on the subform is an unbound dropdown box. When the form (and subform) are opened the dropdown on the first record receives focus, but the text is blank (just a blinking cursor). If I click on any other record, the first record's dropdown text then display the correct value (and the record I clicked on does not go blank).

I tried the following line

Call DoCmd.GoToRecord(acDataForm, "DetailsSubform", acNewRec)

in the both the main form's and subform's Load, Open and Activate events with no luck. Either I get an error that the subform isn't open, or there's a conflict with the routine that populates the dropdown.

I'm looking for a way for either the dropdown to display its value, or simply jump to a new record (my client would prefer the latter but can live with the former). More information can be provided if needed, I just wanted to start with an overview. Thanks.

A: 

You probably need the current event. Note that an unbound control in a continuous subform will display the same value for all records.

Remou
...just to draw out Remou's comment: unbound controls are pretty useless on continuous forms. This is one of many reasons why I generally don't use continuous forms for editing, as I almost always need some conditional alteration of controls, e.g., changing the rowsource of a combo box.
David-W-Fenton
A: 

Is it an event that triggers population of the unbound control and if so which?

g_g