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

Quickest way to update a checkbox to the underlying table

Status
Not open for further replies.

eclipse33

Programmer
Apr 13, 2001
94
CA
Hi,

Quickest way to update a checkbox to the underlying table?

eclipse33
 
Hi eclipse33!

The quickest way is to bind the check box to the underlying field. If that is not a posibility(say the field is a text field) then you should include the field in the record source of the form and use the following code in the after update event of the check box:

If Me!YourCheckBox.Value = True Then
Me!YourTextField = "Yes"
Else
Me!YourTextField = "No"
End If

hth
Jeff Bridgham
bridgham@purdue.edu
 
Hi jebry,

Thanks for your response....just to expand a little

I set the Forms[ParentForm].ckCalled = True after the Parent Form gets its recordsource (Where called <> True)from the query.

I have code in the after event of the checkbox...

Private Sub ckCalled_AfterUpdate()
Me.Refresh
Me.Dirty
End Sub


The checkbox (ckCalled) is on a Parent Form. The Parent Form is bound to a query for its recordsource.

A Next button is on the subform...this Next button saves the contents of the subform to a table AND populates the Parent form with a new record.

This is when the checkbox must be immediately marked True because the next user (on a network) can't get the same data. And the &quot;Where ckCalled <> True&quot; SQL is how the Parent form gets its recordsource??

This should update immediately to the underlying table right???

I can't understand why two workstations get the same record if the called field updates immediately??

HELP??? [bigears] [bigears] [bigears]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top