Check Box on continuous form

CanWest

Registered User.
Local time
Today, 16:40
Joined
Sep 15, 2006
Messages
272
I have a continuous form in my database that depending on the criteria used will display any number of records. Each record has a check box so the user can select a record for printing. Quite often the user wants to select all of the checkboxes.

My question. Is there a way to do that in vba off of a command button.
 
I have tried the following code:

Code:
With Me.RecordsetClone
    Do Until .EOF
        Me.chkPrint = True
        MoveNext
    Loop
End With

I get the error Sub or Function not defined. Does anyone have any ideas?
 
Well, this would need to change to:

.MoveNext

And the Me may not do what you expect.
 
Well, this would need to change to:

.MoveNext

And the Me may not do what you expect.

The . in front of the MoveNext got rid of the error. And it works for the first record and then stops.
 
Perhaps something like:
Code:
  Dim rec As Recordset
  
  Set rec = Me.RecordsetClone
  
  With rec
    .MoveFirst
    Do Until .EOF
      .Edit
      !NameOfCheckBoxFieldName = True
      .Update
      .MoveNext
    Loop
  End With
 
Perhaps something like:
Code:
  Dim rec As Recordset
  
  Set rec = Me.RecordsetClone
  
  With rec
    .MoveFirst
    Do Until .EOF
      .Edit
      !NameOfCheckBoxFieldName = True
      .Update
      .MoveNext
    Loop
  End With

That did it. And now that I see it I see how it works. Many thanks
 

Users who are viewing this thread

Back
Top Bottom