If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting DefaultValue Property
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 |
#2
|
|||
|
|||
Setting DefaultValue Property
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""" -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Mark" wrote in message k.net... 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? |
Thread Tools | |
Display Modes | |
|
|