I am using some code from a book to read the value selected in a Combo box and use it to open up a Continuous Form page.
i.e. user chooses the country and the Form view opens up listing all the forms that pertain to that country.
If the code is opening a Report it reads as
Sub CntryR()
If IsNull(Me.cboSelectC) Then
DoCmd.OpenReport "ReviewsbyCountry", View:=acViewPreview
Else
DoCmd.OpenReport "ReviewsbyCountry", View:=acViewPreview, WhereCondition:="ReviewsbyCountry=" & Me!cboSelectC
End If
Me.cboSelectC = Null
End Sub
When I use that same code for Forms I have
DoCmd.OpenForm "ReviewsbyCountry", View:=acViewPreview
It opens up the form OK but shows nothing in the details section.
Anyone know what I am doing wrong? When I open the ReviewsbyCountry form by itself, it opens up fine.
I have looked this up in a bunch of places and can't find out what 'ac' means or if it even applies to Forms.
i.e. user chooses the country and the Form view opens up listing all the forms that pertain to that country.
If the code is opening a Report it reads as
Sub CntryR()
If IsNull(Me.cboSelectC) Then
DoCmd.OpenReport "ReviewsbyCountry", View:=acViewPreview
Else
DoCmd.OpenReport "ReviewsbyCountry", View:=acViewPreview, WhereCondition:="ReviewsbyCountry=" & Me!cboSelectC
End If
Me.cboSelectC = Null
End Sub
When I use that same code for Forms I have
DoCmd.OpenForm "ReviewsbyCountry", View:=acViewPreview
It opens up the form OK but shows nothing in the details section.
Anyone know what I am doing wrong? When I open the ReviewsbyCountry form by itself, it opens up fine.
I have looked this up in a bunch of places and can't find out what 'ac' means or if it even applies to Forms.