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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update check box on form

Status
Not open for further replies.

AccessXP

IS-IT--Management
Jan 29, 2002
132
How can I update a check box on a form automaticly when the form opens?
 
How areya AccessXP . . .

Your post is vague at best!
[ol][li]What type formview are we talking here (datasheet, continuous, single)?[/li]
[li]Is it your intent to update specific records according to criteria or all?[/li]
[li]Why is necessary to update at all?[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Thanks...I got this morning by using the code,

Me.CheckedIN.SetFocus
Me.CheckedIN.Value = 1

Thanks again.
 
AccessXP, as you've found, setting the value for a check box when the form opens works, but I question the reason to do so.

If the checkbox is FALSE, setting it to TRUE would not necessarily be correct, eh?

If you are opening the form with a NEW (to be added) record, the best way of doing what you seem to want is to set the DEFAULT VALUE of this field to TRUE, so any NEW records have that value ( -1 ) set in them.

It's usually a bad thing to alter field values 'just for the hell of it', e.g. not as the result of some user action. Opening a form and changing the value of something is generally not a good thing.

Correct me if my presumptions are false...(e.g., "0").. :)



"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
The form is displaying a record called by a select query, so I can't have the master table with every record true.

There is another query that is ran looking at that field for all the true values.

There are no new records being entered.

Hope this helps.
 
Well, no it doesn't, actually.

Is the value for the check box TRUE or FALSE? Does your first query select all TRUE records and then open the form? If so, the check box should already be "checked" when the form opens...

I'm missing something here.





"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top