Choice Problem

G

Guest

I'm setting up a ticket booking database but on the bookings form I want to
restrict the price of tickets if the performance is a certain day. I have a
combo box to select the performance day and a combo box to select the ticket
prices. When I select "Tuesday" I only want the ticket prices to be £8.00 and
not to have a choice. Can anyone help, please.
 
A

Allen Browne

Presumably this combo has a RowSource that gets its values from a table?

Change the RowSource to something like this (substituting your own field
names, of course):
SELECT IIf(Weekday([BookingDate])=3, 8, [MyPrice]) AS ThePrice FROM
Table1;
 
G

Guest

The combo box that contains the prices are typed in rather than selecting
from a table or query.

Allen Browne said:
Presumably this combo has a RowSource that gets its values from a table?

Change the RowSource to something like this (substituting your own field
names, of course):
SELECT IIf(Weekday([BookingDate])=3, 8, [MyPrice]) AS ThePrice FROM
Table1;

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

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

Nigel said:
I'm setting up a ticket booking database but on the bookings form I want
to
restrict the price of tickets if the performance is a certain day. I have
a
combo box to select the performance day and a combo box to select the
ticket
prices. When I select "Tuesday" I only want the ticket prices to be £8.00
and
not to have a choice. Can anyone help, please.
 
A

Allen Browne

If the RowSourceType is a ValueList, then you will need to assign a new
Value List (with just one item - the 8) if WeekDay([BookingDate] = 3.

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

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

Nigel said:
The combo box that contains the prices are typed in rather than selecting
from a table or query.

Allen Browne said:
Presumably this combo has a RowSource that gets its values from a table?

Change the RowSource to something like this (substituting your own field
names, of course):
SELECT IIf(Weekday([BookingDate])=3, 8, [MyPrice]) AS ThePrice FROM
Table1;

Nigel said:
I'm setting up a ticket booking database but on the bookings form I
want
to
restrict the price of tickets if the performance is a certain day. I
have
a
combo box to select the performance day and a combo box to select the
ticket
prices. When I select "Tuesday" I only want the ticket prices to be
£8.00
and
not to have a choice. Can anyone help, please.
 

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