User Profile
Collapse
-
Thanks for the help with this everyone. I have one more issue that I am trying to address. The checkboxes were placed in a particular order to reflect the desired order of the columns (fields) on the output document. I went through and changed the tab order to reflect the desired order of operations but the query is not pulling the fields in the right sequence. Is there a particular way that I can set the order of select fields that generates the... -
Column autofit with VBA for a table
Hi,
I recently put together an access db that spits out a tons of separate Excel sheets by looping through a querydef. The select items are dynamic (different columns can be added or removed with checkboxes) and I have an issue with doing a column autofit on the table. when i got to adjust the columnwidth to the range, it decides to fit once for the content and then a second time for the headers. Based on the data, the columns are... -
Exporting multiple queries to formatted excel template
Hello All, Thanks for the help so far. I have been able to get a file working that allows dynamic field names to be selected by the user and run through a query. The last piece of the puzzle I am dealing with is exporting the query results to Excel templates for formatting. I have attached my code below. Is there anything I can do to direct the results to the first worksheet in a formatted excel doc (see attached) that is driven by a macro? Can you... -
Insert unbound form fields to table
Hello, I am trying to run a query that will help me insert unbound form fields to a database table. I have basically created a form that will allow users to select the columns (with tons of help from you guys) and would now like to have a main form that will input new search parameters as a record that can be queried later to rerun previous reports. All of my checkbox fields are being inserted into the table but it seems to be treating my text boxes... -
The value of strSQL is a string that comes out like this
Code:[LaneID], [RefNum], [OCity], [OState], [OZip], [DCity], [DState], [DZip], [AnnualVol], [CarName], [SCAC], [RateType], [TotalRate],
Code:SELECT [LaneID], [RefNum], [OCity], [OState], [OZip], [DCity], [DState], [DZip], [AnnualVol], [CarName], [SCAC], [RateType], [TotalRate] FROM data;
It runs through everything...Leave a comment:
-
Turns out that some of the fields were not in the table (formatting issue). I pulled the SQL generated from the debugger and was able to run it multiple times (using the checkboxes to determine random column headers) and populate a data table. The code itself will still not "execute". I have tried to modify it based on some tutorial videos I watched but can't figure out what is going wrong. Any thoughts?
Code:Option Compare Database
Leave a comment:
-
They are field names that are created in the query. Fore example, see the below code. Is this an issue?
Code:SELECT [Lane ID] as [LaneID] from Table1
Leave a comment:
-
Thank you again for the help. I was able to get the first solution to work (for the most part). The issue I have now is that the query does not execute. I pulled the code out from the debugger and it seems to be correct. The problem is that when I enter it into a query/try to execute it via the button, it asks for parameters for each of the fields instead of pulling the information. Any thoughts? The SQL from the debugger is included below
...Leave a comment:
-
Combobox to filter the data in form (Checkbox and text box values).
Hi everyone,
I am having some trouble getting my combobox to populate filtered data in my form. I have a table title "tbl_setup_deta il" that stores various data fields in textboxes (customer name, file name, template) and checkboxes (Origin, Destination etc.). The checkboxes are simple yes/no boxes to identify the columns that the user wants to include in the report. Essentially, we want the user to be able to be able to... -
Thanks for the quick response. I was trying to make sense of a previous post that you had helped someone with but can't figure out exactly where this would go. Does it matter where I declare the dimensions? Also, the form has 4 text boxes that also pass variables through the query. so I'm not sure how this would be added to my existing code:
Code:Do [B]query = setup("query")[/B] For Each qd In db.QueryDefs If qd.Name
Last edited by Rabbit; Jan 22 '14, 09:03 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.Leave a comment:
-
Building Query based on fields selected in a form
Hi Everyone, I have recently been tasked with taking over a bunch of Access databases that I didn't create. My VBA skills are weak to say the best but I have a particular problem I am working on. What I want to do is use a form to identify multiple value that will pass through a query and generate excel documents for a split field. I already have the code for that but I need to add a "column selection" tool to add orCode:delete particular columns
Last edited by Rabbit; Jan 22 '14, 09:03 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: