SELECT Description, "=" & [PartID] AS PartID
FROM Part
ORDER BY Description;
By why? Normally only the Description is shown in a combo, not the ID number. Are you showing both the description and the partID? Why are you showing the ID?????
Basically i am using this to fill a dynamic drop down menu. The reason i want the = infront of the number is beasue i want to have a record which can select them all, i.e <>-1
SELECT Description, "=" & [PartID] AS PartID
FROM Part
ORDER BY Description;
SELECT Description,"=" & [PartID] AS PartIDS
FROM [Part]
ORDER BY Description
You could not see the differences between what I posted and what you posted?
The only difference that I see that matters is the "S" on the end of PartID.
But the big thing that is missing, is you say it does not appear to be working. Could you explain what is happening that makes it appear to not be working? Do you get and error message? If so, what is it and what does the message say? If you run this code and nothing happens, explain nothing. If all I know is it does not appear to work, I really have NOTHING to go on. Within reason, the more info you give us, the better chance we have of understanding what the problem is.
I really don't want to give up on this, because I think I have seen a really great concept in your design. Could you show us the complete SQL statement for the dynamic drop down box, and give some details as how you want to use it?
Thanks,
If you use Vic's code
SELECT Description, "=" & [PartID] AS PartID
FROM Part
ORDER BY Description;
You will get a "circular reference error" as PartID cannot be an alias when it is also a field name.
The correct code is
SELECT Description, "=" & [PartID] AS PartIDs
FROM Part
ORDER BY Description;
Could you post a sample database that has this table and form in it so I can see what is going on?
Thanks,
I can tell from just the few posts I have seen of Allan Murphy he knows what he is talking about. I also know what I'm talking about. Now, two people that should be able to help you, have, but it is not working. I asked for a sample of what you are dealing with. If you would like to take the time to post that sample, I feel Allen, me, or someone else will be able to spot the problem VERY easily with SEEING the database.
Thanks,
I have requested twice to be able to see the ACTUAL database, or a SAMPLE of the actual database. This would allow me to SEE with my own eyes what the code looks like. You have not even acknowledged that I have asked the question about seeing the database or a sample. But you do continue to ask the exact same question. I DO NOT know the answer. But, with the help of the visual of seeing the database, or a sample database, I think I have a very good chance of help you. Until you can address the issue of posting the database...