Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Patagonia Region Chile
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pass field value to New Record in New Form (A2k)

    Hello.

    I have created a button on Form A that opens Form B to a new record. I also need to put a value from FORM_A's FIELD_22 into Form_B's FIELD_99 for the new record and then refresh.

    I have tried the following and various similar guesses.... Any help would be greatly appreciated. Thanks.

    Private Sub Command13_Click()
    On Error GoTo Err_Command13_Click

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim meetingtype As String
    meetingtype = Me.MeetingID

    stDocName = "frm_meetings_actual"
    DoCmd.OpenForm stDocName, , , , acFormAdd
    [Planned_mtg_ID] = meetingtype


    Exit_Command13_Click:
    Exit Sub

    Err_Command13_Click:
    MsgBox Err.Description
    Resume Exit_Command13_Click

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pass field value to New Record in New Form (A2k)

    Does it work if you change the line

    [Planned_mtg_ID] = meetingtype

    to

    Forms(stDocName)![Planned_mtg_ID] = meetingtype

  3. #3
    Star Lounger
    Join Date
    May 2002
    Location
    Patagonia Region Chile
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass field value to New Record in New Form (A2

    Indeed it does work perfectly.

    Thank you very much Hans.

    Very truly yours.

    Jason

Posting Permissions

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