Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007

    Question Unanswered: Maybe a simple question?

    I posted something similar on this before, but am still unclear on what I need to do.

    I have one form in my database in which i use to enter workmans compensation claims. for instance, name social security number etc.

    I have a second form I use to house a different form of this information. Instead of retyping the information in form #1 in form #2, am I able to create a button that will just import the data?


    In form #1 I want to import record 20 for John Doe into form #2. well instead of having to type all this in form #2 can't I just make a command to import the fields I want?

    Let me know if this makes sense or if more info is needed. Thanks.

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    Well, you can, but generally should not. You would store the key value from the table behind form 1 and store that in the table behind form 2. That would enable you to get at that info in a query.

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 15
    You should not but if you really want to, try something like this:

    1) In the Source form class module:
    Forms!<DestinationForm>.<Control>.Value = Me.<Control>.Value
    2) In the Destination form class module:
    Me.<Control>.Value = Forms!<DestinationForm>.<Control>.Value
    3) From anywhere in VBA:
    Forms!<DestinationForm>.<Control>.Value = Forms!<SourceForm>.<Control>.Value
    Private Sub Command_Synchro_Click()
    ' On Form1
        Forms!Form2.Text0.Value = Me.Text4.Value
    End Sub
    This implies that <SourceForm> and <DestinationForm> are both open, of course!

    There are several ways to include the process in a loop for dealing with multiple controls.

    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts