spikepl
Eledittingent Beliped
- Local time
- Today, 14:35
- Joined
- Nov 3, 2010
- Messages
- 6,142
Access 2007, Win XP.
Displays one value in query, but calculates using another!
I have an option group on the main form. The option group can have value 51, 52 or 53, and after update the subform is requeried.
I query this table in the subform:
Using
and obtain
sfrmStatus
when optStatus = 51. Column Expr1 should display [Forms]![frmStatus]![optStatus], i.e. 51, but displays 3, which is Chr(51)! And so on. Why is this happening and why do I not see the 51 but 3? Especially since the query matches the optStatus in the criterion to 51, 52, 53 as required, but just displays something else.
To see this you just have to open the attached db.
Displays one value in query, but calculates using another!
I have an option group on the main form. The option group can have value 51, 52 or 53, and after update the subform is requeried.
I query this table in the subform:
Code:
tblStatus
StatusID StatusDate
51______07/07/2013
52______07/07/2013
53______
54______
Code:
SELECT tblStatus.StatusID, tblStatus.StatusDate, [Forms]![frmStatus]![optStatus] AS Expr1
FROM tblStatus
WHERE ((Not (tblStatus.StatusDate) Is Null) AND (([Forms]![frmStatus]![optStatus])=52)) OR (((tblStatus.StatusDate) Is Null) AND (([Forms]![frmStatus]![optStatus])=53)) OR ((([Forms]![frmStatus]![optStatus])=51));
sfrmStatus
Code:
StatusID_StatusDate_Expr1
51_____07/07/2013_3
52_____07/07/2013_3
53________________3
54________________3
To see this you just have to open the attached db.