jlouija
asked on
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.
[frmMaster1]![TopicID]=val ue.
Of course I just want the value. Any thoughts on how I might accomplish this?
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.
[frmMaster1]![TopicID]=val
Of course I just want the value. Any thoughts on how I might accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.