Problem!

  • Thread starter Thread starter nellz
  • Start date Start date
N

nellz

Hey i am new to this group! I am going to make a database in Access and
i have a design. But i have a small problem. In my design i decided to
have an input form where the fields in which you enter data are red,
but when you have typed some information into the field the box
automatically turns white. Please could someone tell me how to do this
in Access i would be grateful.

Nellz
 
Why do you keep supplying that link? It does not seem to relate to the
question.
 
nellz said:
Hey i am new to this group! I am going to make a database in Access and
i have a design. But i have a small problem. In my design i decided to
have an input form where the fields in which you enter data are red,
but when you have typed some information into the field the box
automatically turns white. Please could someone tell me how to do this
in Access i would be grateful.

If it is a Form in single-form view, you can put VBA code in the OnChange
event to check that the user hasn't erased the content, then change either
Backcolor or Forecolor to the color you want.

If you want this built in to the Table, to work in Datasheet view, sorry,
you don't have that kind of control over Datasheet Table view.

If you are displaying in continuous forms View in a Form, check help on
Conditional Formatting.

Post back with clarification, and perhaps someone will give you more
details. Specifically, (1) which situation above are you talking about, (2)
whether you want the text or the background to change color, and (3) the
name of the Text Box (which should not be the same as the name of the Field
to which it is bound in its Control Source property -- and some of the
wizards do give them the same name).

Larry Linson
Microsoft Access MVP
 
Nellz,

The other answer you received (the one saying "you can't do this with Access
2003") is not relevant to your question.

I have been watching this thread to see if somebody posts something other
than what I could suggest. Since they haven't yet, I will suggest
conditional formatting. Click the text box to select it, then click Format
Conditional Formatting. In the first combo box for Condition1 select
Expression is. In the box to the right of that, put:

IsNull([YourField])

and select a format. Substitute the actual field name.

The text box will change after you update it, so it will remain red until
you move to another control. Same thing in reverse: if you clear the
field, the text box will turn red after you move to another control. If you
need the change to be instantaneous (as soon as the user enters the text
box, or as soon as it contains a value, or whatever) it can be done, but it
gets a bit more complicated.
 
BruceM said:
Nellz,

The other answer you received (the one saying "you can't do this with Access
2003") is not relevant to your question.

I have been watching this thread to see if somebody posts something other
than what I could suggest. Since they haven't yet, I will suggest
conditional formatting. Click the text box to select it, then click Format
Conditional Formatting. In the first combo box for Condition1 select
Expression is. In the box to the right of that, put:

IsNull([YourField])

and select a format. Substitute the actual field name.

The text box will change after you update it, so it will remain red until
you move to another control. Same thing in reverse: if you clear the
field, the text box will turn red after you move to another control. If you
need the change to be instantaneous (as soon as the user enters the text
box, or as soon as it contains a value, or whatever) it can be done, but it
gets a bit more complicated.

nellz said:
Hey i am new to this group! I am going to make a database in Access and
i have a design. But i have a small problem. In my design i decided to
have an input form where the fields in which you enter data are red,
but when you have typed some information into the field the box
automatically turns white. Please could someone tell me how to do this
in Access i would be grateful.

Nellz

Thanks a lot Bruce! This is exactly what i wanted. This was very
helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top