If you are just getting unexpected results then it's most likely that you want parenthesis around the Ored parts as shown in red below. Otherwise the First [MTy]= '990' dominates the entire expression.
DCount("[ID]", "[tbl_UpdatedRawData]", "([MTy]= '990' Or [MTy] = '996') AND [Typ] = 'RW1'...
A date won't show up in a query expression without first being converted to a string. You can see in the attached database that it shows up when you use CStr like:
SELECT Table1.ID, Table1.F1, CStr([TempVars]![RecDates]) AS Exp
FROM Table1;
I don't know what having the TempVars under a textbox from a from means. Please show us the code that is assigning the textbox value to the TempVar.
But if the form is open when you run the query I wouldn't use a TempVar but instead a reference to the textbox directly in the calculation...
If you want to do textual processing in the modules I suggest checking out the VBA Extensibility library to see if that offers anything that will help you. This web page will give you some examples of what you can do.
You can use them about anywhere you would put an expression. For example if you set a tempvar like:
Dim SomeTempValue As TempVar
TempVars!SomeTempValue = "Something"
You could later use that in a query as an expression for example
SELECT [TempVars]![SomeTempValue] AS A;
You can try this for yourself in the attached database where I tested the OP's assertion. If the table is not open (open by double clicking on it in the nav pane) you get the error, ""The command or action 'GoToRecord' isn't available now." Actually this part of the code
Dim db As...
Oops, Sorry, didn't think about the fact that the control sources would still be there. I think your idea of preventing the problem makes more sense but if you come back to this idea you could try switching the record source to a query which has the same field names but consists of just...
Sorry I understand you have a large database but I'd need to see this to figure this out. Could you create a new database, import the tables, queries and form relevant to this problem and upload that.
I guess you could set the form's record source to an empty string for this case making the form unbounded. When the filter returns something set it to it's normal record source.
I didn't understand where the OP was dragging them from. It didn't make sense to me that he would add them to the form and then drag them into the Option Group but that could be the case. I just tried that. When you add a check box to a form outside an Option Group it's an independent check...
For what it's worth it's different in Access 2013. In trying to replicate the OP's problem I added a Option Group to a form and cancelled out of the wizard. I then added three Option Buttons by clicking in the ribbon and then in the Option Group. They ended up having values of 1,2, and 3. So...
I suggest putting in some Debug.Prints to see whats going on. You could start with
Debug.Print "IsNull(Me.txtStand11): " & IsNull(Me.txtStand11)
Debug.Print "IsNull(Me.txtStand12): " & IsNull(Me.txtStand12)
at the beginning of the subroutine. I wonder if there might be some white space in...
I tried to replicate your situation and the only way I found I could do it was to give the option buttons the same value. I suggest you check the option buttons' Option Values to make sure they are not the same. Typically they would have values of 1,2,3 and 4 for four button. The Option...