[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 514
  • Last Modified:

How open form using query as its record source and in continuous mode?

I have a form that normally opens as a single form and uses a table as its record source.  But I want to also be able to open the form from a command button on a menu form in continuous mode and use a query as it's record source.

How do I code this?
0
SteveL13
Asked:
SteveL13
  • 2
1 Solution
 
mbizupCommented:
You can't switch a form from single form view to continuous forms at runtime.  That is a design-view only option.

So, create a form similar to your original (you can even copy it) and set your query as its recordsource. Set the default view to continuous forms.

Then just open it like any other form:

Docmd.OpenForm "YourContinuousFormName"
0
 
SteveL13Author Commented:
Ok.  But that's a shame because if I make a design change in one I have to make the same change in the other one.  Oh well.

Thanks much.
0
 
mbizupCommented:
The alternative is data sheet view, which CAN be set at runtime...
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now