Passing variables across Access 2007 forms

Hello -- I am trying to pass a text variable from Microsoft Access 2007 form "frmMaster1," to "frmAddtopic" using the following code on the "on open" event of frmAddTopic:

    DoCmd.GoToRecord , , acNewRec

    If Not IsNull(Me.OpenArgs) Then
        Dim stTopic As String
        stTopic = Me.OpenArgs
        Me.Topic = stTopic
    End If

This is triggered by a "NotinList function from the TopicId field in FrmMaster1. No code shows up there though.

The value passes, but along with it I get form and field name, e.g.


Of course I just want the value. Any thoughts on how I might accomplish this?
Who is Participating?
Gustav BrockCIOCommented:
Try with this modification:

    Me.Topic = Split(stTopic, "=")(1)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.