Carry a value of a field from one database to another database

P

Phil

Hello everyone,

I am using Access 97 and have 2 database (A and B). There
is a form1 in database A. I added the following code to a
control in form1 to open a form2 in database B.

Private Sub Control1_Click()


Dim stAppName As String
Dim StSelectedField1 As String

StSelectedField1 = Me![Field1]

'open form2 in database B
stAppName = """C:\Program Files\Microsoft
Office\Office\msaccess.exe"" /user ""name"" /pwd ""123"" ""
I:\accnting\databaseB.mdb"" /x ""OpenFrom2"""
Call Shell(stAppName, 3)

End Sub

The code works fine but is it possible to carry the value
of StSelectedField1 (see above) to a field in form2 in
database B. Please help.

PS: I am not a programmer. The above code was copied
from a web site.
 

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