Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Very specific Question???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
option#1 - 13 Mar 2008 22:52 GMT
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...
Albert D. Kallal - 13 Mar 2008 23:22 GMT
> 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....

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.