Help wih code

Rmaster

Rmaster
Local time
Today, 20:43
Joined
Mar 7, 2005
Messages
25
I've used the example from this site to import a word document to my access table. Now i want a check in VBA that if a field value is "Ja" and 2 other options are empty a Field in my table "Statusvca" changes from his standard value Closed to Open i've tried these codes and they dont work.

This is in the Form
Code:
    !Risico = doc.FormFields("fldRisico").Result
    !Vca = doc.FormFields("fldVca").Result
    !Vcaplus = doc.FormFields("fldVcaplus").Result

This i use for check
Code:
If doc.FormFields("fldRisico").Result = "Ja" And IsNull(doc.FormFields("fldVca").Result) And IsNull(doc.FormFields("fldVcaplus").Result) Then
    !Statusvca = "Open"
End If

Code:
    If !Risico = "ja" And IsNull(!Vca) And IsNull(!Vcaplus) Then
    !Statusvca = "Open"
    End If

Can anybody give me any suggestion :cool:

Thanks
Rmaster
 
I have it
it was just an option i hadn't tried :(

Code:
    If doc.FormFields("fldRisico").Result = "Ja" And doc.FormFields("fldVca").Result = "" And doc.FormFields("fldVcaplus").Result = "" Then
    !Statusvca = "Open"
    End If
 

Users who are viewing this thread

Back
Top Bottom