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!

Update checkbox filled by a recordset 1

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
Scrolling through a parent form updates info on a pop up form. My guess is to put something like the following in the form_current of the parent form.
(rstable is my recordset)
(company mailout f is my pop up form)

Forms![company mailout f].rstable.Refresh
That don't work

Forms![company mailout f].[Check12].Requery
That don't work

Forms![company mailout f].requery
That don't work neither
 
That don't work
It's quite vague.
Any error message ? Unexpected behaviour ? ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Forms![company mailout f].rstable.Refresh
application defined or object defined error

Forms![company mailout f].[Check12].Requery
nothing happens

Forms![company mailout f].requery
nothing happens


 
What are you trying to achieve? What are you doing to achieve it? Is there code involved some place? If so, please post it and tell us when it launches. This is very confusing.
 
Ok, sorry I was trying to keep it simple. Many times my issues are just that I don't know some property or method.
I have a parent form with a pop up form. With pop up open scrolling through records on parent page changes data on pop up form. The code on the pop up form is below. Is there some code I can insert on the parent form that will refresh the data in the checkboxes as I scroll through records? The checkboxes do not refresh.

Private Sub Form_current()
Dim db As Database
Dim rstable As DAO.Recordset
Dim sqllst1, sqllst2 As String
Dim mail1, mail2 As Boolean
Dim compnum As Long
Dim addtype As String

compnum = Me.Text18
addtype = Me.Text20
Me!Label45.Caption = Forms![common company].[company name]
Me!Label46.Caption = Forms![common company].Form![Company Address T subform].Form![company address type] & " " & "Address Mailouts"

Set db = CurrentDb
Set rstable = db.OpenRecordset("Company-Mailout T", dbOpenDynaset)

sqllst1 = "[company numeric] = " & compnum & " and [address type] = " & "'" & addtype & "'" & " and [mailout] = 'c mailout 1'"
sqllst2 = "[company numeric] = " & compnum & " and [address type] = " & "'" & addtype & "'" & " and [mailout] = 'c mailout 2'"
sqllst3 = "[company numeric] = " & compnum & " and [address type] = " & "'" & addtype & "'" & " and [mailout] = 'c
rstable.FindFirst sqllst1
Me!Check12.Value = (Not rstable.NoMatch) And rstable![Send mailout]
rstable.FindFirst sqllst2
Me!Check14.Value = (Not rstable.NoMatch) And rstable![Send mailout]

rstable.Close

The check values are what I want to change.
 
Replace this:
Private Sub Form_current()
By this:
Private Sub Form_current()
doRefresh
End Sub
Public Sub doRefresh()

Then you may try this:
Forms![company mailout f].doRefresh

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you thank you thank you. See I don't know the basic stuff. I haven't been using public subs at all. Awesome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top