N
Naz
Hi
I'm using the Flex Grid demo (thanks peter h)...i've managed to change most
of it to my needs but have come to a stubbling block.
The demo uses Project ID in two tables, they are defined as numbers. My
project ID needs to be Text, so i changed it in both tables opened one of the
forms and got a " Data type mismatch in criteria expression " error, although
i have changed the data type the data remains unchanged.
The part of the code is below, same error for Form Open, the dcount line is
where it fails. I assume its something to do with the syntax for Text having
only changed it from Number....but i just can't seem to figure it out.
Private Sub btnExpandAll_Click()
Dim rst As Recordset
mExpand = ""
Set rst = CurrentDb.OpenRecordset("SELECT ProjectID FROM tblProjects")
Do Until rst.EOF
If DCount("ID", "tblProjectTasks", "ProjectID = " & rst!ProjectID) >
0 Then
mExpand = mExpand & "." & rst!ProjectID & "."
End If
rst.MoveNext
Loop
rst.Close
FillGrid txtDate
End Sub
All help is appreciated.
I'm using the Flex Grid demo (thanks peter h)...i've managed to change most
of it to my needs but have come to a stubbling block.
The demo uses Project ID in two tables, they are defined as numbers. My
project ID needs to be Text, so i changed it in both tables opened one of the
forms and got a " Data type mismatch in criteria expression " error, although
i have changed the data type the data remains unchanged.
The part of the code is below, same error for Form Open, the dcount line is
where it fails. I assume its something to do with the syntax for Text having
only changed it from Number....but i just can't seem to figure it out.
Private Sub btnExpandAll_Click()
Dim rst As Recordset
mExpand = ""
Set rst = CurrentDb.OpenRecordset("SELECT ProjectID FROM tblProjects")
Do Until rst.EOF
If DCount("ID", "tblProjectTasks", "ProjectID = " & rst!ProjectID) >
0 Then
mExpand = mExpand & "." & rst!ProjectID & "."
End If
rst.MoveNext
Loop
rst.Close
FillGrid txtDate
End Sub
All help is appreciated.