On Sat, 31 Jan 2004 14:07:13 -0500, Todd D. Levy wrote:
Mike,
The reason I don't use this method is that it apparently only works when
the form (that the combo box in question in on) is opened directly.
If it is opened (for instance) via a VBA coded button on another form
the default value is not picked up.
I have tried setting the default value in properties at the form level
as well as for the field at the table level without success.
Unfortunately the code I am using is not working properly either:
In the On Current event I have the following
If Me.NewRecord Then
Me.ComboBox = "XYZ"
End If
What am I doing wrong?
Todd D. Levy
In article <s_*******************@news20.bellglobal.com>,
no****@somewhere.con says...
ComboBox is a reserved word, so if that is the name of your control in
question, you may experience a number of problems. If it is, change it's
name and try again, if it's not and you are using the proper control name,
then I'm not sure what's going on. The Default Value property and your code
should accomplish the same thing. Except that using your code, if the focus
leaves your form and comes back, the combobox value may change when you
don't want it to.
--
Mike Storr
veraccess.com