K
Krista
My situation...
I have a form that is created from a query of two tables. Within this form
there is a contactID (foreign key to the contact table), giftID (primary
key), batchID (foreign key to the batch table), and now a tributeID (foreign
key to the tribute table). After entering all the gift information including
associating all the IDs (except tribute), I want to be able to associate a
tribute. I have set the field to be a lookup value. If the value is not
there I created a pop-up box that asks, 'Add a new tribute?' If the answer
is yes, the tribute form opens. I then add a new tribute. My question is,
how can I copy the value of the new tributeID and place it in the tributeID
field on the Gift form? I have tried global variables,etc. with no luck. What
am I missing?
See the code that I have tried below: (This will work within the same form.
It will not work using multiple forms.) Note: I have tried writing -
Form![GiftForm]![txtTributeID.value] = stTribute
Option Compare Database
Public stTribute As String
Private Sub Command12_Click()
DoCmd.Save
stTribute = Me.Tribute_Name
txtTest.Value = stTribute
End Sub
Please Advise...
Thank you.
I have a form that is created from a query of two tables. Within this form
there is a contactID (foreign key to the contact table), giftID (primary
key), batchID (foreign key to the batch table), and now a tributeID (foreign
key to the tribute table). After entering all the gift information including
associating all the IDs (except tribute), I want to be able to associate a
tribute. I have set the field to be a lookup value. If the value is not
there I created a pop-up box that asks, 'Add a new tribute?' If the answer
is yes, the tribute form opens. I then add a new tribute. My question is,
how can I copy the value of the new tributeID and place it in the tributeID
field on the Gift form? I have tried global variables,etc. with no luck. What
am I missing?
See the code that I have tried below: (This will work within the same form.
It will not work using multiple forms.) Note: I have tried writing -
Form![GiftForm]![txtTributeID.value] = stTribute
Option Compare Database
Public stTribute As String
Private Sub Command12_Click()
DoCmd.Save
stTribute = Me.Tribute_Name
txtTest.Value = stTribute
End Sub
Please Advise...
Thank you.