How to enforce data entry into specific fields?

N

Narwe

I have to fields on my form:

One field is a simpe number value.

The second field defines the units of my number value(ie.kg, mg, inches, cm, etc)

I simply need a way to force the users to select a unit from the unit field. This field cannot be null if a number value has been entered in the partner field, and users should not be able to continue entering data unless a unit has been selected.

What is the simplest possible way that I can do this? I dont even know how to have a message window pop up!
 
R

rkc

Narwe said:
I have to fields on my form:

One field is a simpe number value.

The second field defines the units of my number value(ie.kg, mg, inches, cm, etc)

I simply need a way to force the users to select a unit from the unit
field. This field cannot be null if a number value has been entered in the
partner field, and users should not be able to continue entering data unless
a unit has been selected.
What is the simplest possible way that I can do this? I dont even know
how to have a message window pop up!

The simplest possible way would be to enter a validiation rule for the field
in table design view.
Something like: IN("kg", "mg", "inches", "cm")

Also set Required to True.
 
N

Narwe

the appropriate units in the units field are selected from a dropdown list.

what i just tried to do using vb was write an if statement that instructed the 'units' field to be 'true' if and only if the 'number' field contained an value.

i can get as far as this:

if number <> null then
units. BLAMO

after the '.' the only option i have is 'value'

im totally lost
 
N

Narwe

ok i figured out why i wasnt getting other option than 'value' so thats no longer the issue.

basically all i need is a popup window to remind the user to sattisfy the units field.

how do i make a popup?
 
R

rkc

Narwe said:
ok i figured out why i wasnt getting other option than 'value' so thats no longer the issue.

basically all i need is a popup window to remind the user to sattisfy the units field.

how do i make a popup?

Lookup the MsgBox function in the help file.
 
V

Van T. Dinh

I think with this method, the user only gets the validation message just
before the actual update into the Table.
 
R

rkc

Van T. Dinh said:
I think with this method, the user only gets the validation message just
before the actual update into the Table.

Right. But, it serves the purpose at engine level. The user friendly gui
fluff can be placed on top of that.
 

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

Top