nice and easy this one ..
firstly make a qry on your table on the information you wish to have on your form , now use the wizard for a combo box .
this will populate 1 field on your form
if you open up the attachment (A2000)
then look at the form revised quote
add new record asnd use the invoiceto drop down box and pick
"was up" you will see that this populates the fields in the form
I have 2 types of clients Client and Broker
Clients get everything sent to them
brokers get invocies /letters but policies are written on insured basis
look at the code and at the drop down box you will see that the fields match
(access on combo boxs starts counting at 0 (not 1) so if you have 6 fields you want Access starts at 0 then 1,2,3,4,5 (6 fields in total)
understanding this little bit of code should help
look at the code
Private Sub Invoiceto_AfterUpdate()
Me.InvoiceAcctype = Me.Invoiceto.Column(1)
Me.InvoicetoAccno = Me.Invoiceto.Column(9)
Me.Refresh
If Me.InvoiceAcctype = "Client" Then
Me.Insured = Me.Invoiceto.Column(0)
Me.Add1 = Me.Invoiceto.Column(3)
Me.Add2 = Me.Invoiceto.Column(4)
Me.Add3 = Me.Invoiceto.Column(5)
Me.Add4 = Me.Invoiceto.Column(6)
Me.AddPostcode = Me.Invoiceto.Column(7)
Me.Refresh
End If
If Me.InvoiceAcctype = "Broker" Then
Me.Insured = " "
Me.Add1 = " "
Me.Add2 = " "
Me.Add3 = " "
Me.Add4 = " "
Me.AddPostcode = " "
Me.Refresh
End If
End Sub