I have a form in MS Access where I enter a value (I'll call it Value_A) that is then passed to multiple queries. After the queries run, the results of the final query are exported to a .csv file for import into another program.
To summarize my workflow: 1) I enter a Value_A into a field in Form1, 2) I click a button in Form1 that initiates an event where Value_A is passed to a series of queries (using an On Click Event sub procedure with DoCmd), 3) the results of the final query are exported (within the same sub procedure), and I enter the next Value_A and start again.
I have about 400 values of Value_A to enter. Is there an easy way to pass all the values of Value_A through the subprocedure or to the field in the form? I can query all values of Value_A or put them into a table.
My apologies if my description is somewhat confusing.
8 1492 zmbd 5,501
Recognized Expert Moderator Expert
query all values of Value_A or put them into a table
- To make sure I understand, all of the data for "Value_A" are already in the database ?
If this is true:
Then I would take your current code and alter it slightly so that we open a DAO record-set on your field with all of your "Value_A" and then step thru this record-set feeding the returned value into the current code so that the queries are ran.
This could be done in a new form so that your current form need not be altered, or we could even just add a button to the current form that will fire the batch off.
Yes. That is correct. All the data for Value_A are already in the database. Right now I just query it and then enter it manually (which seems like a waste of time). So stepping through each value is exactly what I need to do.
zmbd 5,501
Recognized Expert Moderator Expert
I can NOT stress this enough... DO NOT WORK ON THE ORIGINAL FILE nor the PRODUCTION FILE.
You can either use the Operating system or Access to make a copy of the file, add "backup_" to filename,(Using the OS you might need to remove "copy of" if its there).
Make a second copy of the file, remove "copy of" and add "dvlpmnt_"
dvlpmnt_ will be the file you play with... if Access crashes, no big deal, if you trash something close; then, you can use the operating system to copy backup_ and save as the dvlpmnt_ starting from scratch.
This should be easy enough for you to do, depending on your VBA background. I've already given you the basic outline; thus, you need only decide which way to go, new form (if the database is not split AND there are no other values being pulled from the exsiting form - my choice), new command button (if the database is split OR there are other values being pulled from the form), or alter the current command button (not my choice in either case).
I don't have much VBA background, but I can do fairly basic things. I like the idea of using a new form, but I am flexible. If you can show me an example of how to step through each record and pass it to the query, I think I can pretty easily apply it to my existing database.
Thanks for your help.
That worked! Thanks! I was even able to use my existing form with only minor tweaking.
zmbd 5,501
Recognized Expert Moderator Expert
Thnx Neopa!
teach me not to read all of the insight articles... at least I was on the right path!
(^_^)
NeoPa 32,557
Recognized Expert Moderator MVP
There was nothing amiss from your post Z. I merely added some flesh to what you'd already explained.
PS. Hit me up if you'd like a copy of my Bytes DB which stores links to all the articles I've felt to be important. I can think of no better expert to make use of it as you post so fully and frequently.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jack |
last post by:
Hi,
I have a form when loaded, retrieves record from an access table. Among
other fields there is a check box called FinalUpdate. This is tied to a field
in Access of type Yes/No.
The form...
|
by: William Wisnieski |
last post by:
Hello Everyone
Access 2000
Looking for some suggestions and advice on how to proceed with this. I hope
its not as complicated as it seems to me right now.
I've got an unbound main form...
|
by: Craig M |
last post by:
Hi,
I've created a query that has all calculations needed, and made a report
based on this.
I have then made a form based on this query.
What I would like to do is print only the current...
|
by: Theo Jansen |
last post by:
Hi, i'm making an application in Access and in the query made, i'd
like the user to fill in a parameter when opening the query (in a
report). It's much easier for the user if the parameter was a...
|
by: RookieDan |
last post by:
Greetings fellow Accessers!
Im new but in Access, but I have some background in different coding.
I have a programme loading customer data into Access belonging to BMW dealers in Europe.
...
| |
by: kcdoell |
last post by:
Hello:
I have a form that I am using to help me display a query that I have built. On that form I have multiple combo boxes that I have called cobMonth, cobYear, cobWorkingRegion, etc......
|
by: Andrus |
last post by:
For paged data access I need to convert result of DLinq query to something
(list or array) which can be accessed by integer index.
I use for this metod below.
Is it best solution to use foreach...
|
by: reeba |
last post by:
I want to store the query result, in an servlet, into an xml file and display the contents of the xml file on the browser......
my code is as follows:
public void doPost(HttpServletRequest...
|
by: urfriend |
last post by:
Hi,
I have a multiple search form, and when I use it, it displays the result according to the criteria given in that form.
However, the result is shown in datasheet view as a query result.
How can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |