JCDarr1327
Technical User
I am trying to use a word template that will populate data (customer info) based on based on a unique customer number entered in a field. The data source is a linked Access Database
I have tried 2 ways, I used the mail merge option which populates a form based on a record #, not the customer. I looked into writing VBA with the mail merge but it seemed complicated and there is very little literature on doing this.
I then set up the fields needed to be populated with text boxes and tried running Dlookup with VBA but I hit another wall with the 424 Runtime error.
Can anyone see what I am doing wrong?
TextBox13 value will be text 'Smith Plumbing'
TextBox1 one is number 12345
Cust_name is the column in access i want to bring back
CreditAppCustData is the table name
Cust_Num is the refernece field
Private Sub TextBox13_Change()
TextBox13.Value = Access.Application.Dlookup("'Cust_Name'", "CreditAppCustData", "Cust_Num=" & TextBox1.Value & " ")
End Sub
Please help!
Jason
I have tried 2 ways, I used the mail merge option which populates a form based on a record #, not the customer. I looked into writing VBA with the mail merge but it seemed complicated and there is very little literature on doing this.
I then set up the fields needed to be populated with text boxes and tried running Dlookup with VBA but I hit another wall with the 424 Runtime error.
Can anyone see what I am doing wrong?
TextBox13 value will be text 'Smith Plumbing'
TextBox1 one is number 12345
Cust_name is the column in access i want to bring back
CreditAppCustData is the table name
Cust_Num is the refernece field
Private Sub TextBox13_Change()
TextBox13.Value = Access.Application.Dlookup("'Cust_Name'", "CreditAppCustData", "Cust_Num=" & TextBox1.Value & " ")
End Sub
Please help!
Jason