Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting/Moveing record in another access db?????

Status
Not open for further replies.

Jar80

Technical User
Jun 13, 2004
69
FI
This is little bit complicated and i don´t know is this possible to do.

I have form which contains information and there are button, now when i press button then open another form and previous form won´t close.

Another form has buttons yes and no, now when i press button yes i want that First form record will be moved in to the another access database and i mean only that record, not whole table.

How this is possible to do?
 
Jar80

One approach for "moving" a record to another Access database is to link the target table(s) to your database.

If this is on-going, then you may wish to include the target table(s) with your database.

From the menu, "File" -> "Get External Data" -> "Link Tables"

now when i press button then open another form and previous form won´t close.

If you open the new form as a "Modal" form, then you can not close / access underlying forms until the "Modal" form is closed.
 
That certainly sounds possible; however, the way you describe your situation is very confusing.

If I understand it correctly, you have two forms open at the same time and, on the press of a button, you want to copy the active record on one form to fill out the fields of another form.

If that is correct, you need to add the following line of code for each field that you're copying:

Code:
me.myfield1.value = Forms.Item("theotherform").Recordset.Fields("theotherfield1").Value

Where "myfield1" is the name of the field receiving the value, "theotherform" is the name of the other form, and "theotherfield1" is the name of the field whose value you want to copy.

(BTW, that's one single line of code).

You add that line in the on-click event of your button, or whatever event you want. Be sure that both forms are open, and the source form especially should not be in design view when you're testing it.

You'll have to write that line of code for every field you want.

Christopher
 
Thank you for your answerings, now it works using access macros.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top