Check Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a used car database. under the[Forms] i have the seller & buyers info,
sometimes buyers will get money from bank to purchase a car, so i have a Lien
Holder Info, could I make a check box for "Lien Holder", so if i check the
box then it will force me to fill in all the Lien Holder Info, like bank
name, address..., if I chose not the check the box, then i don't have to type
in the Lien info, thenk you. Carol
 
Hi

One way would be to add some code to your exit button on your form so
that if the checkbox is ticked then ensure there is data in the "lien
holder" fields a bit like:

if me![check box name] = 0 then ' is not ticked
exit sub
else
if (isnull(me![bank info name]) or (isnull(me![bank address
name]) then
msgbox "The Lien Holder check box is ticked, please enter
the relevant details"
exit sub
end if
end if

I haven't checked this but it should be ok if you substitute the names
for your controls. You can add extra (isnull(me![bank info name])
parts if you like.

James
 
Hi, James, thank you so much, i got it working.

James said:
Hi

One way would be to add some code to your exit button on your form so
that if the checkbox is ticked then ensure there is data in the "lien
holder" fields a bit like:

if me![check box name] = 0 then ' is not ticked
exit sub
else
if (isnull(me![bank info name]) or (isnull(me![bank address
name]) then
msgbox "The Lien Holder check box is ticked, please enter
the relevant details"
exit sub
end if
end if

I haven't checked this but it should be ok if you substitute the names
for your controls. You can add extra (isnull(me![bank info name])
parts if you like.

James

Carol said:
I have a used car database. under the[Forms] i have the seller & buyers info,
sometimes buyers will get money from bank to purchase a car, so i have a Lien
Holder Info, could I make a check box for "Lien Holder", so if i check the
box then it will force me to fill in all the Lien Holder Info, like bank
name, address..., if I chose not the check the box, then i don't have to type
in the Lien info, thenk you. Carol
 

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

Select first empty row in a column 9
Loop 1
Data Validation 11
Tax disc holder 6
Table Setup and Reports Suggestions 1
Auto Sort by column B 1
VB code in Excel 4
check boxes on a parameter form 3

Back
Top