palehorse
Active member
- Joined
- Jan 28, 2005
- Messages
- 34
- Programming Experience
- 1-3
Hello everyone,
I have something that has been bothering me for a while now. It seems to be a complicated thing for me since I can't seem to find a resolution.
I have an access db that I am working with. It holds data on equipment for different locations.
setup is like so:
Columns:
inv_location, inv_equipment, inv_mileage, inv_status
Rows:
950102, AB 1785, 4698, clean
950102, DC 1989, 5897, dirty
950102, GH 1221, 1225, clean
950103, EL 1896, 9892, repair
950103, JH 1002, 10256, ready
950103, TM 1599, 1478, dirty
on my form, I have two text boxes to search with. One, the user enters in the location number which corrosponds with inv_location which has many duplicate values. The next text box they enter in the equipment number which corrosponds with inv_equipment which holds no duplicate values. Upon clicking on the search button, I am trying to have it look for that particular location number, then find that equipment number. Once it has done this - it then looks at the columns for the inv_mileage and inv_status fields.
An example how this will work:
txtbox1 = 950102, txtbox2 = GH 1221
on the form, there are two lables, lblMileage and lblStatus.
once the button is clicked - it finds the particular record and the lables would read like so:
lblMileage = 1225
lblStatus = clean
I even tried to hard code it in like this and it doesn't work:
select * from mydatabase where inv_location='950102' and inv_equipment='gh 1221'
Can sombody help me out with this?
I have something that has been bothering me for a while now. It seems to be a complicated thing for me since I can't seem to find a resolution.
I have an access db that I am working with. It holds data on equipment for different locations.
setup is like so:
Columns:
inv_location, inv_equipment, inv_mileage, inv_status
Rows:
950102, AB 1785, 4698, clean
950102, DC 1989, 5897, dirty
950102, GH 1221, 1225, clean
950103, EL 1896, 9892, repair
950103, JH 1002, 10256, ready
950103, TM 1599, 1478, dirty
on my form, I have two text boxes to search with. One, the user enters in the location number which corrosponds with inv_location which has many duplicate values. The next text box they enter in the equipment number which corrosponds with inv_equipment which holds no duplicate values. Upon clicking on the search button, I am trying to have it look for that particular location number, then find that equipment number. Once it has done this - it then looks at the columns for the inv_mileage and inv_status fields.
An example how this will work:
txtbox1 = 950102, txtbox2 = GH 1221
on the form, there are two lables, lblMileage and lblStatus.
once the button is clicked - it finds the particular record and the lables would read like so:
lblMileage = 1225
lblStatus = clean
I even tried to hard code it in like this and it doesn't work:
select * from mydatabase where inv_location='950102' and inv_equipment='gh 1221'
Can sombody help me out with this?