I am trying to write some VBA that can check if a certain value exists in a
field in a table. The field is a text field. The table is not a part of the
query that forms the recordsource of the form on which I am trying to do
this. I wish to act on the presence (or absence) of this value. What I am
doing is trying to have a generic password form such that when you click a
button to open the next form, the code checks if there is a letter for that
form in the PassID field in tblPass. If there is, it opens a password form,
if there is not, it opens the form directly without the need for a password.
The idea is to allow clients to password any form they wish.
For example, the code for opening a form from the current form might be ZZ.
If the value ZZ exists in field PassID in tblPass, the password form will be
opened. If no such value exists, the form is opened directly.
Has anyone any ideas on how I can do this? What I seem to be missing is how
to quiz the table to see if the value exists in that field.
dixie
field in a table. The field is a text field. The table is not a part of the
query that forms the recordsource of the form on which I am trying to do
this. I wish to act on the presence (or absence) of this value. What I am
doing is trying to have a generic password form such that when you click a
button to open the next form, the code checks if there is a letter for that
form in the PassID field in tblPass. If there is, it opens a password form,
if there is not, it opens the form directly without the need for a password.
The idea is to allow clients to password any form they wish.
For example, the code for opening a form from the current form might be ZZ.
If the value ZZ exists in field PassID in tblPass, the password form will be
opened. If no such value exists, the form is opened directly.
Has anyone any ideas on how I can do this? What I seem to be missing is how
to quiz the table to see if the value exists in that field.
dixie
Comment