By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Using default value to clue the user into what info to type

P: n/a
ARC
I have a form with a first name and last name field right next to each
other. The last name field has no label.

I'm using: defaultvalue="[First Name]" and defaultvalue =="[Last Name]" for
new recs so a beginner-type user knows what goes where. After looking at a
customer's database, already the very first record, sure enough, has last
name = "[Last Name]".

I wish there was a text box property for showing a sample in light grey, but
without using the default value prop, so it never actually saves to a new
record. Anyone know a good solution?

Thanks!

Andy

Oct 6 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Fri, 5 Oct 2007 19:35:34 -0500, "ARC" <PC*****@PCESoft.invalid>
wrote:

In the Form_BeforeUpdate write:
(assuming your control name is txtLastName)
if Me.txtLastName.Value = "[Last Name]" then
Msgbox "Yo! Fill out the Last Name!", vbExclamation
Me.txtLastName.SetFocus
Cancel = True
end if

Even better, you could write a loop over the Controls collection,
checking for each textbox if the value equals the defaultvalue, or
perhaps if the value starts with [ and ends with ]

-Tom.

>I have a form with a first name and last name field right next to each
other. The last name field has no label.

I'm using: defaultvalue="[First Name]" and defaultvalue =="[Last Name]" for
new recs so a beginner-type user knows what goes where. After looking at a
customer's database, already the very first record, sure enough, has last
name = "[Last Name]".

I wish there was a text box property for showing a sample in light grey, but
without using the default value prop, so it never actually saves to a new
record. Anyone know a good solution?

Thanks!

Andy
Oct 6 '07 #2

P: n/a
On Fri, 5 Oct 2007 19:35:34 -0500, ARC wrote:
I have a form with a first name and last name field right next to each
other. The last name field has no label.

I'm using: defaultvalue="[First Name]" and defaultvalue =="[Last Name]" for
new recs so a beginner-type user knows what goes where. After looking at a
customer's database, already the very first record, sure enough, has last
name = "[Last Name]".

I wish there was a text box property for showing a sample in light grey, but
without using the default value prop, so it never actually saves to a new
record. Anyone know a good solution?

Thanks!

Andy
You can use the control's ControlTip property to indicate what should
be entered. It shows when the user hovers the cursor over the control.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Oct 6 '07 #3

P: n/a
ARC
Thanks, Fred, and Tom.

I like the "Yo!! knuclehead..." message box, wonder if they'd even read it??

I know about the controltip text. But I've seen other packages (Quicken,
etc.), that put sample text in the fields, but it's a very light-grey, and
no need to hover over.

I wish access had a text box property where you could do just that.
"fredg" <fg******@example.invalidwrote in message
news:fl****************************@40tude.net...
On Fri, 5 Oct 2007 19:35:34 -0500, ARC wrote:
>I have a form with a first name and last name field right next to each
other. The last name field has no label.

I'm using: defaultvalue="[First Name]" and defaultvalue =="[Last Name]"
for
new recs so a beginner-type user knows what goes where. After looking at
a
customer's database, already the very first record, sure enough, has last
name = "[Last Name]".

I wish there was a text box property for showing a sample in light grey,
but
without using the default value prop, so it never actually saves to a new
record. Anyone know a good solution?

Thanks!

Andy

You can use the control's ControlTip property to indicate what should
be entered. It shows when the user hovers the cursor over the control.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Oct 6 '07 #4

P: n/a
On Fri, 5 Oct 2007 23:13:25 -0500, "ARC" <PC*****@PCESoft.invalid>
wrote:

Couldn't you just set the font color?
-Tom.

>Thanks, Fred, and Tom.

I like the "Yo!! knuclehead..." message box, wonder if they'd even read it??

I know about the controltip text. But I've seen other packages (Quicken,
etc.), that put sample text in the fields, but it's a very light-grey, and
no need to hover over.

I wish access had a text box property where you could do just that.
"fredg" <fg******@example.invalidwrote in message
news:fl****************************@40tude.net. ..
>On Fri, 5 Oct 2007 19:35:34 -0500, ARC wrote:
>>I have a form with a first name and last name field right next to each
other. The last name field has no label.

I'm using: defaultvalue="[First Name]" and defaultvalue =="[Last Name]"
for
new recs so a beginner-type user knows what goes where. After looking at
a
customer's database, already the very first record, sure enough, has last
name = "[Last Name]".

I wish there was a text box property for showing a sample in light grey,
but
without using the default value prop, so it never actually saves to a new
record. Anyone know a good solution?

Thanks!

Andy

You can use the control's ControlTip property to indicate what should
be entered. It shows when the user hovers the cursor over the control.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Oct 6 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.