Visble feild bassed on on other feilds

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

Guest

I need to create a database for recording the bookings of a venue. in the
database, i need to set up a feild that is only visble when to other fields
meet certain criteria.

i have a form and on that is a subform. on the subform the three feilds are,
DayOfBooking, (lookup menu containing days of the week)
TimeOfBooking, (lookup menut with Evening Afternoon and morning)
Extended. (tickbox)

When the day of booking is set to Friday or Saturday and the time of booking
is set to evening, I want the Extended feild to become visble, when those
values are not true, i want the tixk box to not be shown.

The Pseudo code that i have come up with follows;

If DayOfBooking = "Friday" or "Saturday" and TimeOfBooking = "Evening" then
Extended.visble = true
else
Extended.visble = false
end if.

I would appreciate any help on where to place the code, and the correct
syntax for if.

Thanks in advance.
Aesc-leah Smith
 
The visible aspect ONLY works on FORM View and NOT on datasheet views.
If you are using a datasheet view for your subforms then you can use
..enabled as an alternative and will get somewhat similar results.

You also need to change your compare:

If DayOfBooking = "Friday" or "Saturday" and TimeOfBooking = "Evening"
then
says: if it is Friday OR
if it is Saturday and timeofbilling is evening.

to make it what you said in your description you need to make it:

If (DayOfBooking = "Friday" or DayOfBooking = "Saturday") and
TimeOfBooking = "Evening" then
 

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

Back
Top