Focus a field

S

Simon

Hi,

I have a file the record of which has 3 fields.
I created a form “DefaultView Property†which is “Continuous Formsâ€

There are 3 fields which can be left empty without any problem. However, if
the first one has data then the third one has to be filled in, obligatorily,
and vice versa.

So the programme should not allow to the user a) to focus on other record
and b) to add a new record when one of the above mentioned cases stands.


Thanking you in advance for your collaboration
 
A

Allen Browne

Open your table in design view, and set a validation rule on the table (not
on a field) such that if Field1 is not null then field3 must not be null.

The validation rule to enter in the Properties box (not lower pane) in table
design would be like this:
([Field1] Is Null) OR ([Field3] Is Not Null)

More info:
http://allenbrowne.com/ValidationRule.html
 
S

Simon

I wrote the command in the properties of the file (validation rule) but it
did not work.

Allen Browne said:
Open your table in design view, and set a validation rule on the table (not
on a field) such that if Field1 is not null then field3 must not be null.

The validation rule to enter in the Properties box (not lower pane) in table
design would be like this:
([Field1] Is Null) OR ([Field3] Is Not Null)

More info:
http://allenbrowne.com/ValidationRule.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Simon said:
Hi,

I have a file the record of which has 3 fields.
I created a form “DefaultView Property†which is “Continuous Formsâ€

There are 3 fields which can be left empty without any problem. However,
if the first one has data then the third one has to be filled in,
obligatorily,
and vice versa.

So the programme should not allow to the user a) to focus on other record
and b) to add a new record when one of the above mentioned cases stands.


Thanking you in advance for your collaboration
 
A

Allen Browne

Keep trying. You can do it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.
Simon said:
I wrote the command in the properties of the file (validation rule) but it
did not work.

Allen Browne said:
Open your table in design view, and set a validation rule on the table
(not
on a field) such that if Field1 is not null then field3 must not be null.

The validation rule to enter in the Properties box (not lower pane) in
table
design would be like this:
([Field1] Is Null) OR ([Field3] Is Not Null)

More info:
http://allenbrowne.com/ValidationRule.html

Simon said:
Hi,

I have a file the record of which has 3 fields.
I created a form “DefaultView Property†which is “Continuous Formsâ€

There are 3 fields which can be left empty without any problem.
However,
if the first one has data then the third one has to be filled in,
obligatorily,
and vice versa.

So the programme should not allow to the user a) to focus on other
record
and b) to add a new record when one of the above mentioned cases
stands.
 

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