Table Default Value

G

Guest

I have a Table which I'll import information to. When I open the Database a
default form opens and I have a combo box that i select a value from in a
drop down menu format. i want this value to be the default value in one of
the fields of the table I am importing to.

I tried ... [Forms]![frm01]![Site] ... but got an error message.

Anyone have any thoughts?
 
G

Guest

Try Me.comboname.selected(0) in VBA on the form load event. the '0'
corresponding to the row that you wish to default to.

Hope it helps,
Regards,
Nick.
 
V

Van T. Dinh

Not sure I understand your description correctly but if you want to assign
the value of the ComboBox (unbound???) to another Control which is bound to
the required Field in the Table then you need to use the
ComboBox_AfterUpdate Event to assign the value to the other Control / Field.

The code should be something like:

Private Sub ComboBox_AfterUpdate()
Me.OtherControl = Me.ComboBox
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top