Very specific Question???

O

option#1

Ready?

I have an Access database (2000 format running on 2007) connecting through
an ODBC to PostgreSQL. Postgres queries are very particular i.e. case
sensitive. Now that we have that out of the way...here is the problem.

I am using a combo box in a form to assign a variable to a table. There are
three options available in the combo box. I won't go into detail...it is
entered like this:

option1;option2;option3;

Access removes the last semicolon...so now whenever the value is written to
the table it sees:

option3 <space><space><space><space><space> (spaces being actual spaces not
words.)

So when I query my table using 'option3' as a filter I get nothing because
technically it isn't there. I can go in and delete the spaces in the table
and everything is fine, but obviously this won't do. The spaces are not added
to any of the other options. I am guessing this is because the semicolon cuts
it off.

Thoughts. Suggestions...
 
A

Albert D. Kallal

option1;option2;option3;

Access removes the last semicolon...so now whenever the value is written
to
the table it sees:

Access should.

do you have

1,2,3

or

1,2,3, <- no way a delimited string needs the last training comma, or in
your case ";"

How are you addressing the comb box value? if you using the .column()
property, they are 0 zero based.....
option3 <space><space><space><space><space> (spaces being actual spaces
not
words.)

So when I query my table using 'option3' as a filter I get nothing because
technically it isn't there.

that does not seem right at all. Your string for 3 valeus should be:

option1;option2;option3

if you have 4 values, then:

option1;option2;option3;

However, I should point out that you can use "," for a delimiter, if your
text has any comma inside of it...you in a heap of trouble.....

I would suggest you use a table for the combo box source....
I can go in and delete the spaces in the table
and everything is fine, but obviously this won't do. The spaces are not
added
to any of the other options. I am guessing this is because the semicolon
cuts
it off.

I not sure what you exact problem here is, but if you string has other
delimiters such a ",", and perhaps a few others, then I would NOT use a
value list..as it going to mess up the combo box. Your problem as described
seems not normal, but in the time to figure out what's going on, I would
simply re-do the combo box and base the source on a table...

About the only thing I can think of here is that some of the "option" values
have a comma, or some other character that access thinks in a delimiter....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top