Enter the Docket Number to retrieve customer information.

Alan#

Registered User.
Local time
Today, 15:21
Joined
Feb 27, 2014
Messages
14
Hi Guys, I am working on a database for a Skip Delivery Company, I have all relevant tables and Forms done and can add customers and so on. I have a field name in my Skips Delivered table called Delivery Docket which contains a long list of customer dockets. What i want to do is, be able to retrieve all customer information (such as Customer Name, County, Location, Phone Number and so on ...) on my Skips Delivered form by just entering the docket number on that form. I'm thinking i need an SQL Statement somewhere? Do i need a new button? appreciate any help!
 
Please post a jpg of you tables and relationships. You will have to zip this because of your post count.
 
Hey sorry for late reply, i got done what i needed but now i want to add "a no matching record" message box vba code to what i already have, that it would be easy but having difficulty:(

Function FindData()
Dim rs As DAO.Recordset
Dim strSQL As String

strSQL = "Select * From [Skips Delivered] Where [Deliver Docket] = " & txtDel

Set rs = CurrentDb.OpenRecordset(strSQL)

cboCust = rs("Customer")
txtCust = rs("Name")
txtOrderNumber = rs("Order Number")
txtCustRef = rs("Customer Reference")
cboCounty = rs("County")
txtLocation = rs("Location")
txtPhoneNo = rs("Phone No")
txtSkipNo = rs("Skip No")
txtDateDropped = rs("Date Dropped")
cboTruck = rs("Truck")
txtDateCollected = rs("Date Collected")
txtDateWeighed = rs("Date Weighed")
cboWasteCodes = rs("Waste Code")
txtWeight = rs("Weight")
txtWeighTicket = rs("Weigh Ticket")
cboStatus = rs("Status")
cboPaidBy = rs("Paid By")
txtInvoice = rs("Invoice No")
cboVatCode = rs("VAT Code")
txtPrice = rs("Price")
txtVatType = rs("VAT Type")
txtInvoiceGoods = rs("Goods")
txtInvoiceVat = rs("Vat")
txtInvoiceTotal = rs("Total")
rs.Close
 

Users who are viewing this thread

Back
Top Bottom