frustrating
Registered User.
- Local time
- Today, 10:08
- Joined
- Oct 18, 2012
- Messages
- 68
Greetings:
I am trying to create an application that pulls text from a pdf and displays it into its applicable form fields. I will be extracting over 40 pieces of data from these certificates that get sent. I want each certificate to act as one record set, yet when I put in a request for the second piece of information, it doesn't add it to the Current form, but rather creates a new one. Here is the code I am using:
Here is the second statement I also want to add.
Any ideas on how to combine these two statements so both values go into the same record in their respective fields?
Thanks for any help!
I am trying to create an application that pulls text from a pdf and displays it into its applicable form fields. I will be extracting over 40 pieces of data from these certificates that get sent. I want each certificate to act as one record set, yet when I put in a request for the second piece of information, it doesn't add it to the Current form, but rather creates a new one. Here is the code I am using:
Code:
Private Sub Command3_Click()
Dim TheCert As String
Dim CarrierPlace As String
Dim CarrierName As String
Dim InsuranceCompanyAplace As String
Dim InsuranceCompanyA As String
Dim CertEnd As Integer
Dim strSQL As String
Dim strSQLINSA As String
CertEnd = FreeFile
Open Text1.Value For Input As CertEnd
Do Until EOF(CertEnd)
Input #CertEnd, TheCert
CarrierPlace = InStr(1, TheCert, "insured")
If CarrierPlace > 0 And InStr(1, TheCert, "IMPORTANT") = False And InStr(1, TheCert, "$") = False And InStr(1, TheCert, "Document") = False Then
CarrierName = Mid(TheCert, CarrierPlace + 8, 50)
strSQL = "INSERT INTO Temp ([CarrierName]) VALUES ('" & CarrierName & "');"
CurrentDb.Execute strSQL, dbFailOnError
Forms!Extractor.Requery
End If
Loop
Close CertEnd
End Sub
Code:
InsuranceCompanyAplace = InStr(1, TheCert, "INSURER A")
InsuranceCompanyA = Mid(TheCert, InsuranceCompanyAplace + 9, 30)
If InsuranceCompanyAplace > 0 Then
strSQLINSA = "INSERT INTO Temp ([InsuranceCompanyA]) VALUES ('" & InsuranceCompanyA & "');"
CurrentDb.Execute strSQLINSA, dbFailOnError
Forms!Extractor.Requery
Thanks for any help!