Checkbox doesn't update in subform (1 Viewer)

Steven

Registered User.
Local time
Yesterday, 21:48
Joined
Mar 5, 2011
Messages
15
Hi all,

I have a subform with Unbound CHECKboxes. When clicking them my table is updated correct.
The problem is that when I open the subform the next time for the NR on the head form, all my CHeck boxes are set to FALSE, but I want them to have the value that is stored in the table.
So I thought I do the following:
===========================
If PROJNR_SK <> Null Then
MR_11 = DLookup("ActiviteitJN", "Activiteitenlijst", "ACTNR_SK = 3001 And PROJNR_SK = " & Me!PROJNR_SK)
If MR_11 = True Then
Selectievakje31 = True
End If
End If
===========================
The PROJECT_NR gives me the correct number and the lookup gives me TRUE, but in my form the checkbox "Selectievakje31" still displays FALSE.
What am I doing wrong.

Thx in advance for your time and help,
Steven.
 

John Big Booty

AWF VIP
Local time
Today, 14:48
Joined
Aug 29, 2005
Messages
8,263
Bookmark this link for future reference, it contains the correct syntax for referring to sub-forms and their properties and controls from various relative locations.
 

Steven

Registered User.
Local time
Yesterday, 21:48
Joined
Mar 5, 2011
Messages
15
Hi John,

Thx for your reply, but this is not what I am looking for.
I just need the code to give the checkbox the value TRUE, so that it is checked, if the lookup gets the value TRUE out the table.

There are loads of people having troubles with this, but I can't find the answer.
Maybe anyone has the right solution.

Greetings,
Steven.
 

ChrisO

Registered User.
Local time
Today, 14:48
Joined
Apr 30, 2003
Messages
3,202
Try: -

If Not IsNull(PROJNR_SK) Then
 

Steven

Registered User.
Local time
Yesterday, 21:48
Joined
Mar 5, 2011
Messages
15
Hi ChrisO,

Thx for your reply, it finally worked :)

Greetings,
Steven.
 

Users who are viewing this thread

Top Bottom