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
 
Back
Top