Solved

ms access forms with subforms commad

Posted on 2011-02-18
2
195 Views
Last Modified: 2012-05-11

We have a form with a command button in the main form and a tab with 3 subforms of different record types. In the subforms i have a check box, that when is checked it makes 3 fields visible. The problem that i have is that if a user checks the box but does not enter information in the fields, when they press the command button in the form it takes them out to the main menu and won't let me edit the fields.  I tried putting code in the close event of the subforms to cancel the command button event in the form and display a message if not entry was made in the fields but nothing works.  I also tried the unload event with no success.

I put code in the check box click and on current events to make the fields visibles.

 
 
0
Comment
Question by:Shen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34930713


<...when they press the command button in the form it takes them out to the main menu >

here is one way to make this work.
you can set the enabled property of the command button to No as the default.
Enable the command button only when an information was entered to the controls/fields.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 34930829
or use the beforeupdate event of the form to check for controls/fields that are not filled

see codes from this thread

http://www.experts-exchange.com/Database/Miscellaneous/Q_22653980.html#a19351039
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

628 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