Default Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to set a field's default value in a form to the contents of another
field on another table.

Help
 
You can use the Form OnOpen event to set the default value

Private Sub Form_Open(Cancel As Integer)
Me.FieldName.DefaultValue = Dlookup("FieldName","TableName")
End Sub
 
Ok it almost works. It places the value into the default of the field. But I
get the #Name? error because it wants quotes around the value in the default
field.
 
Back
Top