Exact error message:
Record Source 'SELECT
.[field] FROM
;' specified on this form or report does not exist.
... and for all I can see, it does:
'Heading Column PName
PNameFieldValues = "PracticionerID; Name"
Call LoadPractitionerName(0)
Me!lbxPName.RowSourceType = "Table/Query"
Me!lbxPName.RowSource = PNameFieldValues
Me!lbxPName.ColumnCount = 1
Me!lbxPName.ColumnHeads = False
Private Sub LoadPName(PID)
Dim db As Database, rs As Recordset, strSql As String
Dim pnNewID As String
'Check for the bottom of the tree
If IsNull(PID) Then
Exit Sub
End If
Set db = CurrentDb()
strSql = "select name from [practitioner contact info] where practitionerid=" & PracticionerID
Set rs = db.OpenRecordset(strSql)
Do While Not rs.EOF
PNameFieldValues = PNameFieldValues & PracticionerID & ";" & rs("practitionerid" & ";" & rs("test" & ";"
'Recursive call to check for children
Call LoadPName(rs("practitionerid")
rs.MoveNext
Loop
If Not rs Is Nothing Then
rs.Close
End If
Set rs = Nothing
End Sub
Center for World Indigenous Studies
"Always carry a tuna sandwich in case of tigers."
Record Source 'SELECT
... and for all I can see, it does:
'Heading Column PName
PNameFieldValues = "PracticionerID; Name"
Call LoadPractitionerName(0)
Me!lbxPName.RowSourceType = "Table/Query"
Me!lbxPName.RowSource = PNameFieldValues
Me!lbxPName.ColumnCount = 1
Me!lbxPName.ColumnHeads = False
Private Sub LoadPName(PID)
Dim db As Database, rs As Recordset, strSql As String
Dim pnNewID As String
'Check for the bottom of the tree
If IsNull(PID) Then
Exit Sub
End If
Set db = CurrentDb()
strSql = "select name from [practitioner contact info] where practitionerid=" & PracticionerID
Set rs = db.OpenRecordset(strSql)
Do While Not rs.EOF
PNameFieldValues = PNameFieldValues & PracticionerID & ";" & rs("practitionerid" & ";" & rs("test" & ";"
'Recursive call to check for children
Call LoadPName(rs("practitionerid")
rs.MoveNext
Loop
If Not rs Is Nothing Then
rs.Close
End If
Set rs = Nothing
End Sub
Center for World Indigenous Studies
"Always carry a tuna sandwich in case of tigers."