check whether an option is in a combo box or not

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

Guest

hello folks,

this ones slowly been turning my brains to noodles all day and i need some
help! What ive got is a form which allow a parking space to be set up for a
student, each student has a student reference which is the primary key to the
students database, this also holds the name of the building he/she/it is
living in. This is important becasue only some student accomodation have
parking spaces and i want to there to be a warning if the user tries to give
a student living in a building that doesnt have a parking space a space.

On the parking form there is a text box where you put in the students
registration detail and ive also got a textbox that will autofill with the
students builing, there is also a combo box where you can tell it which
building the parking space is going to be allocated to. What i want is for
the combo box to say the same thing as the building text field if you can
allocate one to that building and to give a warning if you cant.

The combo box has a query control source called 'building with parking'. I
was thinking of using an array to store the values of this query and then
compare it with the value of the building textbox, but i dont know how to
read the values that are stored as combo box options. Any ideas?

with much thanks

Amit Patel
 
DowningDevelopments said:
this ones slowly been turning my brains to noodles all day and i need some
help! What ive got is a form which allow a parking space to be set up for a
student, each student has a student reference which is the primary key to the
students database, this also holds the name of the building he/she/it is
living in. This is important becasue only some student accomodation have
parking spaces and i want to there to be a warning if the user tries to give
a student living in a building that doesnt have a parking space a space.

On the parking form there is a text box where you put in the students
registration detail and ive also got a textbox that will autofill with the
students builing, there is also a combo box where you can tell it which
building the parking space is going to be allocated to. What i want is for
the combo box to say the same thing as the building text field if you can
allocate one to that building and to give a warning if you cant.

The combo box has a query control source called 'building with parking'. I
was thinking of using an array to store the values of this query and then
compare it with the value of the building textbox, but i dont know how to
read the values that are stored as combo box options. Any ideas?


You can look at the combo box items using several methods.
Probably the most straightforward is to use the Column
property (no need for an array).
 
Amit,

I have a reservations module that could be modified that would work very
well for reserving parking spaces for students. The module would be modified
to show all the parking spaces, which ones are reserved and which ones are
still available. You would be able to reserve any available parking space to
the current student while checking that that student is eligible for the
parking space. Send me an email to (e-mail address removed) and I will send
you a screen shot.
 
Hello again Mr Bartonm

That column property was just the ticket, i was looking for a simple way to
iterate through the rows and this was it!!! Me and my C programming making
life overcomplex again!!

thanks for your help again,

Amit
 
Back
Top