wierd combo box results

poporacer

Registered User.
Local time
Today, 11:41
Joined
Aug 30, 2007
Messages
136
I have a form (frmIntelInfo) that has a combo box that I want to populate with data from a table (tblAKA) that is filtered by the text in a textbox (txtID) that is on the form. The combo box does not populate with anything. I have the properties for the combo box to populate via the query:
SELECT tblAKA.ID, tblAKA.AKA
FROM tblAKA
WHERE tblAKA.ID=[Forms]![frmIntelInfo]![txtID]
ORDER BY tblAKA.AKA;

It seems like the query is not working properly but I am not sure why??? Here is what I tried....I put a break point in the "on open" event of the form and in the immediate window I looked at the contents of the text box and it was populated with the ID??? I also checked in the immediate window what the contents of the expression, [Forms]![frmIntelInfo]![txtID] and it too printed the proper ID...
Are you stumped yet?

Thanks for the assistance.
 
ID is text...And as usual you are right on top of it. I tried to enclose [Forms]![frmIntelInfo]![txtID] in single quotes and double quotes....but I am sure you know the trick....is there any references for when to use single or double quotes and where? Thanks for your assistance.
 
Don't know of a reference like that, but there might be something around. Did you get it using quotes or are you still having issues?
 
NO, I didn't get it working so you don't know how to reference a control with test data in a query??? It is wierd because from the immediate window the query seems to work fine!
 
I'm way more visual so I would have to actually see the combo I think to be more help now at this point.
 
What is really strange, is if while the form is open, I go to the properties of the combobox and then the row source for the data and look at the query from the data sheet view the query works....go figure...it seems like it just doesnt like being in a form....I guess I could always add an ID field to the tables and go from there...(the ID that I use is a unique identifier for each person so that is why I used that)
 
Here is the file....I used a different zip program...I hope it is compatible with what you have.
Select any of the names on the form (double click the name or select a name and hit the select button) and then the form in question pops up....the combo box is cmbAKA
 

Attachments

Sorry for the delay. I am having to wait for my updates to happen in my Virtual PC so I can open the file.
 
NO PROBLEM....You are a great asset and if it takes you a while, I won't complain....I am glad someone as knowlegeable as you is around!!!! I just found something!!!! hmmm...well I guess it is the combobox...I stumbled upon the combo box and if I click the arrow, the info is at the bottom but does not populate the combobox....and if I click on the item only one field shows....I have the column count to 2... I will play with it a while....I want to show all AKA's and be able to add new ones as well.... I felt a combo box would be the best way...if not...a list box with a text box to add AKA's would be better?
 
It appears to work for me when I double click on the item it opens the other form and the only selection available in the combo is the same CDC number from the open form. It isn't selected automatically; you have to select it from the combo box, but it is there. I'm not sure what the combo is supposed to do or what you are wanting it to display.

If you don't get anything, what version and service pack are you running?
 
I think my problem is that I want the combo box to do something it can't...I want the combo box to list all the AKA's for the CDC number on the selected form and that the user can add additional AKA's from the same form...I think I might have to use a list box to display the AKA's and a text box with a command button to add additional AKAs to the table. Unless you know of a smoother method.
Thanks for your time! It is greatly appreciated.
 

Users who are viewing this thread

Back
Top Bottom