Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check box on Preference form 1

Status
Not open for further replies.

bigkeith

IS-IT--Management
Jul 27, 2001
36
0
0
GB
Hi,
I'm creating a single user database that will have a preference form. On this form there will be a number of check boxes (one for now will do) that will define popup forms to be toggled on or off. The preference form's record source is a table that has a single yes/no field (for now). I have created a startup form that checks to see the value entered in the yes/no field and either displays the popup form, or not. That part I can get to work. My problem is this, I open the preference form via the switchboard. When the form loads, the current status of the field isn't being determined (the check box is greyed out until you click on it to alter it's value). When you do click on the check box, then another record is added to the field - where I simply want to change it's value. If I open the form from the database view, then all is ok. The value is read from the field and you can alter it with the checkbox no problem. I have added some logic to the activation of the form that checks the current value of the field and changes the check box accordingly, having previously simply specified the checkboxes Control Source.
I'm starting to go round in circles, with what might be a simple task. Any pointers or examples would be greatly appreciated.

Keith
 
How are you loading the Preference Form? with code on Switchboard load, etc? or via a Switchboard command button?
 
Hi CTAdmin,
I'm using a standard switchboard created with switchboard manager, nothing modified or added, that opens the form via a command button

Keith
 
Have you verified that you chose the option to open the form in edit mode rather than add mode? Based on the info you gave originally, it appears that the form is opening in Add mode.
 
Yep, I've checked that I'm opening the form in edit mode.
Any other ideas?

Keith
 
OK. I was able to recreate your situation.

1. Got to the design view of the form.
2. View the form properties
3. Go to the "Data tab"
4. Set "Data Entry" = No

Even though you are telling the switchboard to open in Edit mode, the form value can override it and put the form in "Add" mode.
 
Thanks CTAdmin, that's worked a treat.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top