Hi,
I have code within contonuos form with checkboxes:
Code:
Private Sub But_ok_Click()
Dim rst As DAO.Recordset
Dim counter As Byte
Dim zmiennaPel As String
Dim HowManyChecked As Boolean
Set rst = Me.Recordset
'Me.PivotTable.ActiveView.DataAxis.FieldSets(0).Fields(0).DetailBackColor = RGB(155, 155, 155)
'Set PivotTable fieldsets
rst.MoveLast
rst.MoveFirst
If DCount("Wybór", "QryKlientWew", "Wybór=True") > 1 Then
MsgBox "Wybierz tylko jeden checkbox"
Exit Sub
End If
Do While Not rst.EOF
If IsChecked(rst!Wybór) = True Then
Debug.Print ID_klient_slownik
End If
rst.MoveNext
Loop
'Form_frm_User.Txb_Zakres.Value = me.
End Sub
This form is build on the query "QryKlientWew" where i have:
ID_klient_slownik -primary key - autonumber
Pełnomocnictwo_nazwa - text
Wybór - checkbox
And now i want to get using VBA primary key for specific record where checkbox = true.
How can i achive this ?
Thank you,
best Wishes,
Jacek Antek