Remou, thanks for the code. I wrote the code in my form several years ago and have been away from VBA for some time now. I'll have to spend a few days reacquainting myself with the code in my form and try and integrate your code to create a better solution. Thanks again.
I can select to search by customer number or by customer last name (although I always use last name) using a radio button and I want to find the customer ID in the database corresponding to that number/last name. I then return to the main form with that information in the form.
The Me.Undo didn't eliminate the error when the text is deleted and the 'Cancel' button is selected.
Here is the current code for looking up the name:
Private Sub ByName_AfterUpdate()
On Error GoTo By_Search_Type_DblClick_Err
DoCmd.SelectObject acForm, "Orders by Customer"...
I have a subform in an Access window where I enter a name into a form field (drop-down box) and that name gets matched to names drawn from the database table. If there is no match and I delete the incorrect name and then hit the Cancel button, which is a simple:
Private Sub Cancel_Click()...
There is a Payments table with OrderID, PaymentAmount,PaymentDate, DepositDate,CheckNumber and a few other things. There is an Orders table with customerID, OrderDate, shipping details, FreightCharge, Tax, and other things. There is an Order Details table with OrderID, ProductID, Quantity...
I have been away from Access programming for several months. I have a query run (in an ap I designed) on a typical customer database where on a given date, a customer may make more than one purchase. I also record a single payment amount for each order.
When I create the report, with the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.