Setting DefaultValue Property

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

How do I write the following code to set the default value?

Me!xNum.DefaultValue =
Me!XCurrency.DefaultValue =
Me!XDate.DefaultValue =
Me!XString.DefaultValue =

Can I just put all the lines of code in the Form's AfterUpdate event?

Thanks!

Mark
 
Yes, you can, but bear in mind that the DefaultValue property is a string:

Me!xNum.DefaultValue = """" & 999 & """"
Me.XDate.DefaultValue = """" & Format(Date, "Short Date") & """"
Me.XString.DefaultValue = """Type over this nonsense"""
 
Back
Top