djeverett01
Programmer
I have a main form with several subforms. The main form has the client info. One of the subforms has the diagnosis for this client and the other subform has the problems that relate to the diagnosis.
What I want to do is automatically fill in the problems for a particular client based on their diagnosis. I have tried doing a query that contains all the info, but I run into a problem when a diagnosis has several problems that my query result are more than they should be.
So I am trying to autofill a subform with some data. The problem is that I keep getting a run-time error 3601. Too few parameters expect 1.
This is the code I am using, please help:
Dim Info As Recordset, SQLText1
If DCount("[PATIENT_ID]", "qryInputGoals") >= 1 Then
SQLText1 = "SELECT * FROM [qryInputGoals]WHERE [PATIENT_ID] = '" & Me![ClientID] & "'"
Set Info = CurrentDb.OpenRecordset(SQLText1)
Me![Problem] = Info![Problem]
End If
I get the error message at Set Info = CurrentDb.OpenRecordset(SQLText1)
Dawn Nelson Everett
What I want to do is automatically fill in the problems for a particular client based on their diagnosis. I have tried doing a query that contains all the info, but I run into a problem when a diagnosis has several problems that my query result are more than they should be.
So I am trying to autofill a subform with some data. The problem is that I keep getting a run-time error 3601. Too few parameters expect 1.
This is the code I am using, please help:
Dim Info As Recordset, SQLText1
If DCount("[PATIENT_ID]", "qryInputGoals") >= 1 Then
SQLText1 = "SELECT * FROM [qryInputGoals]WHERE [PATIENT_ID] = '" & Me![ClientID] & "'"
Set Info = CurrentDb.OpenRecordset(SQLText1)
Me![Problem] = Info![Problem]
End If
I get the error message at Set Info = CurrentDb.OpenRecordset(SQLText1)
Dawn Nelson Everett