Re: Cycling Through Every Record in a table/subform When the boolean column is selected



On Dec 11, 1:31 pm, nouveauricheinvestme...@xxxxxxxxx wrote:
Hi,

I have a subform based on a recordset. I have a boolean column where
the user can select the checkbox to the left of the record. If the
user selects the checkbox, I want to check to see if the field exactly
to the right (DeptID) equals a field on my form. If it does, then
that fabulous. If not, then I want to uncheck all boolean values in
the table and display a message box. How would I do that?

This is what I have so far and it is giving me the messagebox saying
it is the EOF. What should I do differently?
Public Function ToCheckDept()

Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset

Dim MySQL As String
MySQL = "SELECT [Pending Tickets].DeptID, [Pending
Tickets].ResearchTicket FROM [Pending Tickets] WHERE [Pending
Tickets].ResearchTicket=True;"
RS.Open MySQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
With RS
If Not .EOF Then
.MoveFirst
Else
MsgBox "It's saying EOF"
Exit Function
End If
End With


Select Case RS.Fields(0)
Case Is = Forms![ViewOpenTickets]![TSDeptID]
Exit Function
Case Else
MsgBox "It is working so far"
End Select
Set RS = Nothing

End Function

.



Relevant Pages

  • Cycling Through Every Record in a table/subform When the boolean column is selected
    ... I have a subform based on a recordset. ... I have a boolean column where ... the user can select the checkbox to the left of the record. ...
    (microsoft.public.access.forms)
  • Painful problem for ya :)
    ... value from a recordset "talent_id". ... This works fine and the data displays as does the checkbox state. ... unticked checkbox doesnt send anything through $_POST so how do I get ... But If I have a lot of data, I'll have a tonne of session variables. ...
    (comp.lang.php)
  • Re: Checkbox Array
    ... With radios, check boxes and buttons, only the values of selected, (or ... page to incorporate the ID of the record the checkbox represents. ... > I have an ASP form that uses a recordset to build a table, ... > causing the corresponding Update statement to write values to the wrong ...
    (microsoft.public.inetserver.asp.general)
  • RE: how do i do this...
    ... >> i have a datagrid with checkbox rows and was wondering how to persist the ... >> extra boolean column manually in the code behind. ... >> item to a template column and somehow tie those together. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DataGrid Column Boolean Value Formatting
    ... I have a boolean column in my datagrid. ... checkbox there are actually Three states for the checkbox. ... > formatting and parsing. ...
    (microsoft.public.dotnet.languages.csharp)