Form design questions

G

Guest

Sir/ Madam,
I am relatively new to Access, and am in the process of designing an
employment application. The table is setup, and I am putting the finishing
touches on the form.
I am running into the following issues:
-How do I change a combo box(yes/no) to a toggle button?
When I insert a toggle button for a control in form design, It gives me a
label box and one toggle button. I need two toggle buttons(yes/no) with their
own labels, and then a label that reflects the control source.
-When the 'yes' toggle button is selected, I need to have a dialogue box
open so an explaination can be provided. How do I do this?
-To be a functional employment application, the applicant should not be able
to use any menus or commands in Access; they should only be able to enter
data in the form. The only function should be a button that saves the
application, and goes to new record. What do you suggest?

I have taken the Video Professor tutorilas and the Microsoft Online
tutorials, but neither get teach the more advanced functions(of which there
are many!). Please instruct me....
 
G

Guest

Ok, the first thing I would suggest is using an Option Group rather than a
combo box for your Yes/No toggle. Option Groups give you the option to set
them up as toggle buttons, plus the added bonus of automatically assigning a
specified value to the Frame surrounding the Option Group, which you can then
run code off of. For example, an Option Group with a Yes button and a No
button could have the values 1 for Yes and 0 for No, and your code could run
a couple of If statements to determine which action to take. Build your
Option Group, then in the Properties of the Frame object, go to the
AfterUpdate section and put in a bit of code similar to this: (This is air
code, so it might not work exactly as written, but the gist of it should be
understandable.)

Private Sub FrameName_AfterUpdate()
If Me!Framename.Value = 1 Then DoCmd.OpenForm "ApplicantInformation"
Else If Me!Framename.Value = 0 Then DoCmd.Close acForm "ThisForm"
End Sub

That should get you where you want to be. As for the dialog box you
mentioned, create a form and use a label object to type out your message.
Then set the form's properties as follows:

Scroll Bars: Neither
Record Selectors: No
Navigation Buttons: No
Dividing Lines: No
Auto Resize: No
Auto Center: Yes
Pop Up: Yes
Modal: Yes
Border Style: Dialog
Control Box: No
Min Max Buttons: None
Close Button: No

Make sure you add a Close Form button somewhere on the form or you'll be
stuck with an open form the user can't close! (You can right click the title
bar of the form and hit Form Design to get back to Design Mode in case you
get stuck). Also, before you set the Pop Up and Modal properties, open your
form and go to the Window menu, and then Size To Fit Form. This will set the
form's window size to the size of the form itself, so you can make it fit to
the text better. Once you do that, be sure to save the form before going back
into Design mode so it will store that window size. (If you immediately go
back to Design Mode it reverts back to the size it was originally.)


And last but not least, to hide the menu bars, right clicking, and
everything else you don't want the user to see, go to Tools, then Startup.
Uncheck everything. This will turn off everything except the File, Window,
and Help menus, as well as right click menus and the Database window and the
Status bar. (You can leave the Status bar if you want, the end user can't
change anything with it, it's just informational.) There are other bits of
advice on how to completely turn off the menus at http://www.mvps.org/access
as well. (You will still be able to edit the database and see the full menus
by holding down Shift before and during opening the database. To bring up the
main database window when it is hidden, press F11.)
 
G

Guest

Thank you for the quick reply.

A few additional questions....
-If I was to create an option group, and create the radio button 'yes', and
specify that a new form open for additional info. Everytime I hit 'yes', a
new form will appear that is referenced to the specifc record?
 
G

Guest

Depends on how you build the form. I'm not exactly sure on how you would do
it, but the basic premise is you would need to set the Record Source of the
second form to match the Record Source of the main form, and then move to the
same record as the current record in the main. I believe you can do this by
using the following in the On Open section of the second form (this is air
code again, by the way):

Private Sub GetFormRecord()
Dim frmRecord as Long
frmRecord = Forms![Main Form].CurrentRecord
Set Me.CurrentRecord = frmRecord
End Sub

You might have to play with the syntax a bit, but that should do the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

QAT & Filter By Form 1
Change color of control if selected 4
Select All Check Boxes Help 4
Date Filter 3
Toggle Button not refreshing 1
Linked Form Filteration 4
Access 2007 Filter by Form 3
Yes No 6

Top