IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New If Ben's answer doesn't help.
Ben's answer is the answer if you are using ADO in your app.
If not, and I'm not sure if you're coding your queries entirely, but if you are using Access's query designer, you can right-click in the area of the designer where the tables are and on the context menu will appear "Parameters..." you can create a parameter there and then refer to the parameter in your code.

I'll assume Ben's link will work for you - if you want to know how to do it another way, lemme know ;-)

>Does Access kill any objects when it hits an error message?
Not that I am aware of. It shouldn't, but then, it is Access we're talking about.

If Ben's answer doesn't help, can you tell me the answers to:

1) Which version of Access are you using?
2) Are you using ADO or OpenQuery to fire off your queries?
3) Is the SQL of your queries hand-coded into a module, or are you creating queries with the designer?

(Aside: if you use the query designer and save the queries in the mdb as opposed to having the SQL coded into a module, you will get a slight performance boost if it Access tables you are hitting. From ADO's perspective, those Access queries are stored procedures)
bcnu,
Mikem

I don't do third world languages. So no, I don't do Java.
New PARAMETERS also available in Access SQL
If not, and I'm not sure if you're coding your queries entirely, but if you are using Access's query designer, you can right-click in the area of the designer where the tables are and on the context menu will appear "Parameters..." you can create a parameter there and then refer to the parameter in your code.


Look up the PARAMETERS keyword. It should lead you to some solution like (off the top of my head):

PARAMETERS [Batch Number?]
INSERT INTO tblMain ( BatchNo, MIRFNumber )
SELECT tblBLS_Add.BatchNo, tblBLS_Add.MIRFNumber
FROM tblBLS_Add
WHERE (((tblBLS_Add.BatchNo) = [Batch Number?]));

...and the user receives an InputBox whose prompt is "Batch Number?".

Etcetera.
I was one of the original authors of VB, and *I* wouldn't use VB for a text
processing program. :-)
Michael Geary, on comp.lang.python
     Public Universal variable. - (acagle) - (8)
         Put them in a module. - (mmoffitt)
         Several ways - (FuManChu)
         Well. . . . . - (acagle) - (5)
             Is the object globally scoped? -NT - (mmoffitt) - (4)
                 Re: Is the object globally scoped? - (acagle) - (3)
                     Answering the other question - (ben_tilly)
                     If Ben's answer doesn't help. - (mmoffitt) - (1)
                         PARAMETERS also available in Access SQL - (FuManChu)

use LRPDism;
38 ms