Does View:=acViewPreview apply to Forms?

MIMF

New Member
Joined
Apr 4, 2002
Messages
16
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.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,221,675
Messages
6,161,216
Members
451,691
Latest member
fjaimes042510

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top