Hi,
I’m running the program in desktop and in PPC in gives error message only in PPC. The message happens with the lost focus of a test box. The message is like :
“An error occurred on sub_txtname_ lostfocus
FormatException
Continue ?”
The code for the sub_txtname_ lostfocus is :
Sub txtname_LostFocus ' Mother entred before child and checking the sex against the mother-number entred.
If txtmn.Text > 0 AND txtmn.Text < txtmemno.text Then
mperid=txthhidm.Text*100 + txtmn.Text ' mperid is a global variable to hold run-time generated mother's perm_pid.
cmd.CommandText="select name,sex,dob,perm_pid from member where perm_pid ="&mperid&""
cmd.ExecuteTable("table15",0)
sexmother = table15.Cell("sex",0)
If sexmother = 1 Then
Msgbox("Wrong mother number '" & table15.cell("name",0) & "' is male, so cannot be mother")
txtmn.Text=""
txtmn.Focus
Return
Else
i=Msgbox ("Is ' " & table15.Cell("name",0) & " ' the mother of ' "& txtname.Text&" ' being entered now?","Mother of Member",cmsgboxyesno,cmsgboxquestion)
If i=cyes Then
cmbsex.Focus
Return
Else
txtmn.Focus
Return
End If
End If
End If
End Sub
I know that only the above lines are not enough to make sense. But expecting help.
regards,
I’m running the program in desktop and in PPC in gives error message only in PPC. The message happens with the lost focus of a test box. The message is like :
“An error occurred on sub_txtname_ lostfocus
FormatException
Continue ?”
The code for the sub_txtname_ lostfocus is :
Sub txtname_LostFocus ' Mother entred before child and checking the sex against the mother-number entred.
If txtmn.Text > 0 AND txtmn.Text < txtmemno.text Then
mperid=txthhidm.Text*100 + txtmn.Text ' mperid is a global variable to hold run-time generated mother's perm_pid.
cmd.CommandText="select name,sex,dob,perm_pid from member where perm_pid ="&mperid&""
cmd.ExecuteTable("table15",0)
sexmother = table15.Cell("sex",0)
If sexmother = 1 Then
Msgbox("Wrong mother number '" & table15.cell("name",0) & "' is male, so cannot be mother")
txtmn.Text=""
txtmn.Focus
Return
Else
i=Msgbox ("Is ' " & table15.Cell("name",0) & " ' the mother of ' "& txtname.Text&" ' being entered now?","Mother of Member",cmsgboxyesno,cmsgboxquestion)
If i=cyes Then
cmbsex.Focus
Return
Else
txtmn.Focus
Return
End If
End If
End If
End Sub
I know that only the above lines are not enough to make sense. But expecting help.
regards,