Solved

Simple VBA question: Making a subform visible using a Case select in a Module

Posted on 2004-04-03
2
322 Views
Last Modified: 2006-11-17
Hello Everyody,

I got a form called frmMain. In that form there is a subform called frmDatum_Overzicht.
The subform is set to be invisible.

When a user enters data a count is made that is used in a Case Select structure in a Module.

I want tot make the subform frmDatum_Overzicht visible if the Case is 2 of 3.
In the Case = 2 block I got the following code.

        Forms!frmDatum_Overzicht.Requery
        Forms!frmDatum_Overzicht.Visible = True

When I run the above option I get the message "access can't find the form frmDatum_Overzicht".

I think Access can't find the form because it is a subform of frmMain. But I don't know how to program
that.

Any help is welcome!

ThanX
0
Comment
Question by:Geerd
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
Comment Utility
Hello Geerd,

> Forms!frmDatum_Overzicht.Requery
>         Forms!frmDatum_Overzicht.Visible = True


Forms!frmMain!frmDatum_Overzicht.Form.requery
Forms!frmMain!frmDatum_Overzicht.visible = true


Pete
0
 
LVL 1

Author Comment

by:Geerd
Comment Utility
ThanX Pete
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Password Hashing vs Encryption for long term viability 3 86
SQL - sum months, quarter, YTD 9 80
MySQL 11 66
MS Access 2003 Query 2 37
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now