cbo box and Forms

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have a form that displays the clients details when the clients name is
selected from a combo box.

When the form loads the cbo box is empty but the form displays the first
record in the table.

How can I make the form empty untill I Select a client.

Extra Info - I'm using a bound form and unbound one
 
Chris,
When you open the form...
DoCmd.OpenForm "frmYourFormName", acNormal
DoCmd.GoToRecord , , acNewRec
This will open the form on a "new" blank record.

Not sure why your combo is empty, but you could try a combobox Requery
on the OnCurrent event of the form. If that doesn't do it, get back to the
NG with another post, with more info on your combobox setup.
hth
Al Camp
 
I'm having the same problem, and I think it stems from using an unbound combo
box. Is there any way to "preload" the first item in the control's recordset
when I open the form?
 
If you want the value of an unbound combo to match the record in the bound
form, do this in the On Current event:

Private Sub Form_Current()
Me.MyCombo = MyID
End Sub

Where MyCombo is the name of the combo and MyID is whatever value in the
bound form that matches the combo.
 
Thank you.

Roger Carlson said:
If you want the value of an unbound combo to match the record in the bound
form, do this in the On Current event:

Private Sub Form_Current()
Me.MyCombo = MyID
End Sub

Where MyCombo is the name of the combo and MyID is whatever value in the
bound form that matches the combo.
 
Back
Top