Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 12th, 2005, 11:40 PM
Mark
Guest
 
Posts: n/a
Default 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  
Old November 12th, 2005, 11:40 PM
Allen Browne
Guest
 
Posts: n/a
Default Re: 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" <mmorrow@earthlink.net> wrote in message
news:EuHnc.591$zO3.461@newsread2.news.atl.earthlin k.net...[color=blue]
> 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?[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles