Passing parameters from one form to another

J

Joey

Hello all,

I was wondering how does one pass parameters from one form to another
without keeping them both open. I would like to pass one Long ID from
one form to another without using another table to do so. For instance,
I obtain a CustomerID from one form that I use to create the customer;
however, I would like to use that CustomerID (or any CustomerID that a
user selects) to spawn a non-bound form (I'm working in a multi-user
environment). I would like to fill the non-bound fields with data based
on the CustomerID. I know I can pass the parameter as a WHERE statement
in a query; however, query results are not updatable and the fields must
be bound. Is there a way around this? (I don't want to bind the fields
to a query because the user may have to alter the data). I don't mind
programatically filling the fields based on a query. Note: the form
contains fields from various tables all linked with the CustomerID.

Thanks,
Joey.
 
V

Van T. Dinh

* Try passing the number through the OpenArgs argument of the OpenForm when
you open the second Form. Check Access VB Help on the arguments of the
OpenForm Method.

* You can simply open the second Form first and in the Form_Open or Load
Event, grab the value from the first Form (which is still open) and do you
processing. After this, you can close the first Form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top