×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Combo Box (Don't show value in selection if already in use)

Combo Box (Don't show value in selection if already in use)

Combo Box (Don't show value in selection if already in use)

(OP)
Hi

I'm trying to add a parking permit form to my database, each person is given a unique parking permit number which can be handed back in and then handed out to another person.
If a parking permit is already in use i don't want the combo box to show it, i can't think of a way to do it.

The steps are:

  • Main form
  • User clicks "Add New Parking Permit
  • a form pops up
I know how to do the above steps, it's the combo box where i get stuck

I have currently.

CODE

tblDropDownParkingPermitNumbers
lngParkingPermitNoID - Autonumber
strParkingPermitDesc - Short Text 

CODE

tblParkingPermits
lngParkingPermitID - Autonumber
lngPeopleID - Foreign Key
lngParkingPermitID - Number 

tblParkingPermits is the record source for frmParkingPermits

I did think of having a status "Standard Use" or "Expired or Cancelled"

In the combox selection on the parking permit form, have something like:

CODE

SELECT tblDropdownParkingPermitNumbers.lngParkingPermitNoID, tblDropdownParkingPermitNumbers.strParkingPermitDesc
FROM tblDropdownParkingPermitNumbers
WHERE (((Status)="Expired or Cancelled")) 

The problem really is how do i assign a status to each parking permit number initially so that there all accessible

Thanks

Michael

RE: Combo Box (Don't show value in selection if already in use)

Just guessing here, but you may want to have a Status table with something like:

tblStatus
ID      Description
0	Active
1	Available
2	Expired
3	Cancelled
4	... 

And if you assign a Status to your PermitNo, it will be easy to retrieve what you want.

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Combo Box (Don't show value in selection if already in use)

(OP)
I think you're right that i do need to add a status to each PermitNo but i'm still not sure how that would work or where do i add the status.

When a user is entering a new parking permit, they select the permit no via a combo box, then i somehow have to attach the status there

I'm so confused right now but i think i've worked out a solution

RE: Combo Box (Don't show value in selection if already in use)

>When a user is entering a new parking permit, they select the permit no via a combo box

So, you do have a list of parking permits somewhere. And it looks to me that some would have a Status of 1 - Available, right? The ones not assigned to anybody. That would make sense since you probably have a limited number of parking permits that you can issue.

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close