Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Mar 2005
    Location
    San Jose, Costa Rica
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query by form problem (Office XP sp3, Win XP SP2 )

    I have a user Query/filter by form that allows the user to select a field from a combo box. Once they choose a field another form opens and they make their selection. Once a selection is made, it is added to a listbox that shows thier query/filter parameters in plain language and hides the query/filter parameters. The subform datasheet is refreshed each time the user adds or subtracts from his/her selection. The database is split with the backend residing on the company server. It works beautifully on most machines but for some reason it does not work on others. Originally, I used the hidden columns of the list box to build filter parameters and apply them to the sub form. Then I tried building the entire SQL string and setting the RowSource property. Again, it works with out error on some machines and produces an error on others. The really odd thing is that it worked on all machines when I first installed it, and now it doesn't. I recieve an error message that the rowsource(or form filter) cant result in the name of a macro etc. The list box goes a little crazy and shows some of the hidden rows in the first column first row and then the plain language below that in the second row first column. I have another form which has several form filter function attached to buttons. This form was not changed between versions and now the filters do not work either. Any ideas? Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    Can you post the code? (if it's long, attach it in a text file)

  3. #3
    New Lounger
    Join Date
    Mar 2005
    Location
    San Jose, Costa Rica
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    You are a braver man than I, Hans.

    Please be warned that I am NOT a trained programmer. My use of naming conventions and error checking is weak. I won

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    That is a lot of code. Where exactly do you get an error message on the problem machines?

  5. #5
    New Lounger
    Join Date
    Mar 2005
    Location
    San Jose, Costa Rica
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    Everything works fine up until the button is clicked to apply the filter or SQL to the rowsource. I get an error that results from applying an erroneous form filter or rowsource. Believe me, it is not erroneous. The only real clue I have is what happens in the listbox when I get the error. One of the hidden columns holds the SQL syntax for the selected fields and when an item is added or removed from the query (listbox) the query is rebuilt from the syntax in the hidden column and reapplied. It looks like access tries to put all three columns of the list box into one column, hence the error. I didn't think that was possible with an MDE. Maybe I should set the number of columns and column widths programmatically each time the query changes?

    Let me know if I'm not making any sense.

    Scott.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    Both On Click event procedures in the code you posted set the RecordSource of mainForm, not the RowSource of a list box, as far as I can see.

    I'm afraid I can't offer further help without seeing the database. If you like, you can post a stripped down copy of your database. See <post#=401925>post 401925</post#> for instructions.

  7. #7
    New Lounger
    Join Date
    Mar 2005
    Location
    San Jose, Costa Rica
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    My mistake, I misspoke.

  8. #8
    New Lounger
    Join Date
    Mar 2005
    Location
    San Jose, Costa Rica
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    Hans, you can breath a sigh of relief, I figured it out and you won't have to dig through my code. I noticed that when the error occurred, the query parameters appeared in the listbox separated at the periods. Somehow the list separator of in the Language and Regional settings got changed from a coma to a period. I changed it back and the QBF form works like a charm. I don't really understand how that affects Access since it uses semicolons as separators for the rowsources.

    Thanks for your help.

    Scott.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query by form problem (Office XP sp3, Win XP SP2 )

    Glad you found it. Thanks for letting us know the solution.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •