troubleshooting Question

Value not getting passed to Popup Form

Avatar of haident
haidentFlag for United States of America asked on
Microsoft Access
10 Comments1 Solution442 ViewsLast Modified:
I am trying to pass a value from one form to the next when selecting an option on a combobox.  The subform opens just fine, but when I try to save it, it tells me the key value is null.  The key value is the value I thought I passed in the arguments.  It is an automated number field in the main form and a number field in the subform.  What am I missing?

Private Sub Combo345_Change()
If Combo345.Value = "Specific Dates" Then
  DoCmd.RunCommand acCmdSaveRecord
  DoCmd.OpenForm "frmSpecificDates", , , "ContractDBNumber =" & Me.ContractDBNumber.Value
Else
  If Combo345.Value = "per Airing" Then
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.OpenForm "frmPerAiring", , , "ContractDBNumber =" & Me.ContractDBNumber.Value
  End If
End If
End Sub
ASKER CERTIFIED SOLUTION
haident

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros