Transfering data between forms

  • Thread starter Thread starter Brant
  • Start date Start date
B

Brant

I have a form created where i have customer information and then the
button that opens another form that relates to that customer. what i
want to do is if there is no match, instead of completley opening a new
form, transfering some of the customer information over to the other
form (just because i want to be able to print this form and see whos
form i am working on at that time)
 
I have a form created where i have customer information and then the
button that opens another form that relates to that customer. what i
want to do is if there is no match, instead of completley opening a new
form, transfering some of the customer information over to the other
form (just because i want to be able to print this form and see whos
form i am working on at that time)

Whoa. Some major potential problems here!

A Form does not contain ANY data. It's a window, a way to view and
edit data which is stored in a Table. So to speak of transferring data
from one "form" to another "form" is (albeit possible) misleading at
best. What are the Recordsources of these two forms?

Secondly, are you storing data redundantly? I.e. if your second form
is based on a different table, are you trying to store the customer
name, address, etc. in both the Customer table and this other table?
If so... DON'T. The whole *point* of a relational database is to store
information *once* and once only, and then just link to it.

Thirdly, have you considered making the second form a Subform of the
first? This will maintain the link automatically with no code at all.

Finally - if you're printing Forms, consider instead creating a
Report. Forms are optimized for onscreen viewing and editing; Reports
for printing. If you want to print out data, create a Query pulling
together the tables containing the data you want printed, base a
Report on that query, and print the report.

John W. Vinson[MVP]
 

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

Back
Top