Here is the deal. or problem if you were. I am having a combobox on my form (loads a list of names)
the program iterates through records till it finds the record that coorisponds to the name. then it will load additional data into the record to be later used in a datareport.
here is the code. i used MZ-tools, which just tells me i have a type mismatch in the click event of the form. arghhh
Public Sub REGetMinorChildInfo(name As String, loadby As String)
Dim strHeight As String
Dim strAge As String
If loadby = "Renames" Then
loadingbyname:
With rsMinorChildren
If .RecordCount = 0 Then Exit Sub
.MoveFirst
Do While Not .EOF
If !fname & " " & !lname = Combo1.Text Then
GoTo endOfSearch
Else
.MoveNext
End If
Loop
Exit Sub
endOfSearch:
strHeight = txtFt & " Ft." & txtIn & " In."
strAge = Age(txtDOB)
!hair = txtHair
!eyes = txtEyes
!Weight = txtWt
!Height = txtheight
!allergies = txtAllergies
!Age = strAge
!work = txtWork
!home = txtHome
!cell = txtCell
!carrier = txtIns
!health_id = txtPolicy
!medicalconditions = txtConditions
End With
Exit Sub
End If
End Sub
thanks!
Stew
LoL Concepts®
the program iterates through records till it finds the record that coorisponds to the name. then it will load additional data into the record to be later used in a datareport.
here is the code. i used MZ-tools, which just tells me i have a type mismatch in the click event of the form. arghhh
Public Sub REGetMinorChildInfo(name As String, loadby As String)
Dim strHeight As String
Dim strAge As String
If loadby = "Renames" Then
loadingbyname:
With rsMinorChildren
If .RecordCount = 0 Then Exit Sub
.MoveFirst
Do While Not .EOF
If !fname & " " & !lname = Combo1.Text Then
GoTo endOfSearch
Else
.MoveNext
End If
Loop
Exit Sub
endOfSearch:
strHeight = txtFt & " Ft." & txtIn & " In."
strAge = Age(txtDOB)
!hair = txtHair
!eyes = txtEyes
!Weight = txtWt
!Height = txtheight
!allergies = txtAllergies
!Age = strAge
!work = txtWork
!home = txtHome
!cell = txtCell
!carrier = txtIns
!health_id = txtPolicy
!medicalconditions = txtConditions
End With
Exit Sub
End If
End Sub
thanks!
Stew
LoL Concepts®