Results 1 to 7 of 7
  1. #1
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22

    NEW ISSUE: List Box preventing query

    What I have right now is a query that shows a few columns of data when I make a selection in my combo box. What I'd like to figure out, is have the query log multiple rows of information. What I mean is, if I make Selection1 in my combo box and then proceed to choose Selection2, I want the query to store two rows of data displaying the columns of Selection1 and Selection2.
    Last edited by kspabo; 07-11-2014 at 03:17 PM.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    So even though you select ONLY One value, you want the query to show 2 values? Then set the Combo Row Source to reflect both selections and then refer to that value in your query,i.e.
    Something.Column(2) for example.

    HTH

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    I don't disagree w/ Burrina - though I interpret your post differently: A combobox holds the value of what is selected. You are using this value as a criteria of a query. When you change the selection of the combobox - of course the criteria of the query changes too - - - and the prior criteria is gone. That's the way it is. What you might do is add a step where the result of the query is written into a temp table made just for the purpose of holding the query result. Then you can change combo selections, get a new query result - and write that over to your temp table. This way you can have unlimited changes to your combobox and see them all in the temp table.... of course at some point you will want to clear that temp table I would think but that's a different issue........

  4. #4
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    I'm trying to achieve exactly what NTC described. As I'm entirely an Access noobie, could you direct me to some resources to help me figure out how to do this all? First, how to have a query write to a table and second to have that table to be able to be cleared. Thank you so much!

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    to write new records into an existing table: Append Query
    to delete records from a table: Delete Query

    those are the topics to look up

  6. #6
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    EDIT#3:

    So I've been able to figure out everything I need so far but two things that are preventing me from finishing this.

    1. I'm getting the message "The database engine could not lock table "tblLineSheet" because it is already in use by another person or process" when I attempt to use my Update query that resets the AutoNumber field to 1.This has occurred ever since I added the List Box with a RowSource directed towards the table.

    2. How do I create a button which exports my table to a .csv file?

  7. #7
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    Ignore my last post, I have been successful at answering my own question. I have one final thing that i need to figure out in order for me to be done.

    So I've created a list box on my form that shows the table as things are added. Here's where I'm running into trouble: The query I've made that resets the AutoNumber column for the table is getting the error "The database engine could not lock table "tblLineSheet" because it is already in use by another person or process". What is a way around this?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-04-2014, 11:04 PM
  2. Replies: 5
    Last Post: 09-09-2013, 03:00 PM
  3. Replies: 2
    Last Post: 04-17-2012, 12:18 PM
  4. Query to keep track of comment history
    By REDandBLACKpack in forum Queries
    Replies: 11
    Last Post: 08-02-2011, 06:45 AM
  5. Stores Library
    By martyparty2006 in forum Forms
    Replies: 5
    Last Post: 05-05-2009, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums