passing data between two databases

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to pass a value from one database system to a text box field of a form
in a seperate database system. Is it possible and how would I do it? Any
help will be appreciated. Thanks
 
Are you asking if it is possible to reference one form to another form in
seperate DB's? I don't think that's a desirable solution.

1. Why not use a linked table where you can reference from
2. Export the value by passing it through via Append Query which references
the other DB. You could create an empty table in that referenced DB and place
the values there.

Maurice
 
I thought of those solutions, but would prefer to pass the variable form to
form. So I'm gussing you don't know how to do it either?
 
A form is bound to a table, so why pass a value to a form, just update the
table that form is linked to.

Unless you want to open a form in mdb2 from mdb1.
If that the case, you can create a reference to mdb2 from mdb1.

1. Open mdb1
2. Open code (any where) from the menu bar select tools > reference
3. Link mdb2

At that stage mdb1 will recognize all the functions in mdb2
4. Open Mdb2
5. Create a function that recieve a value and opening the form and passing a
value to it using the OpenArgs (need to be created in a module)

Function OpenMyForm(MyValue As String)

Docmd.OpenForm "FormName" , , , , , , MyValue

End Function

6. On the Load event of the form write the code

If Not IsNull(Me.OpenArgs) Then
Me.TextBoxName = Me.OpenArgs
End If

7. Open Mdb1 , from it you can run the function created in stage 5
OpenMyForm ValueToPass

Note: Might need to change the type of the value assed to the function
 
Back
Top