If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Find customer by customernumber using sql ?
I have made a form showing the info about my customer in textboxes. But
insted of going through each one of the customers, by clicking on the little arrow, I want the user to enter a customernumber in a textbox and then show the customer info in the textboxes on the form. I have made a query that shows the customer info, and I have put a button on my form, and connected the button to the query. When I push the button a new form is opening and all my customer is showing. When I click the button I want to show the one customer that is entered into a textbox, and not showing up in a new form, but in the textboxes already placed on the main form. Someone who can help me ? www.photo.activewebsite.dk |
#2
|
|||
|
|||
Find customer by customernumber using sql ?
Spookie,
You can do a query if you want, but while your with the Customer recordset, a Find would be much easier... I usually use a simple unbound combobox to select a Customer by Name, and then find the record within the recordset via the CustomerID value. You could alter it easily to select and find by ID if you want. I have a sample file that demonstates that, called ComboQuickFind. (V97 and V2003) See Access Tips at the link below. -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "SpookiePower" wrote in message oups.com... I have made a form showing the info about my customer in textboxes. But insted of going through each one of the customers, by clicking on the little arrow, I want the user to enter a customernumber in a textbox and then show the customer info in the textboxes on the form. I have made a query that shows the customer info, and I have put a button on my form, and connected the button to the query. When I push the button a new form is opening and all my customer is showing. When I click the button I want to show the one customer that is entered into a textbox, and not showing up in a new form, but in the textboxes already placed on the main form. Someone who can help me ? www.photo.activewebsite.dk |
#3
|
|||
|
|||
Find customer by customernumber using sql ?
I'm a bit confused about how you do this. I can see that you have
something called "Row Source" in the combobox containing a query. I cant see who this query connect to the two textboxes and then, when I place a combobox/textbox on my form, there is not something called "Row Source" where I can put a query. |
#4
|
|||
|
|||
Find customer by customernumber using sql ?
Spookie,
The query behind the combo box allows the user to select a unique CustomerID for Access to find. The AfterUpdate code of the combo performs that Find. Private Sub cboFindRecordID_AfterUpdate() DoCmd.GoToControl "RecordID" DoCmd.FindRecord cboFindRecordID DoCmd.GoToControl "LastName" End Sub If the Combo control you placed on your form doesn't show a RowSource property, then make sure that you have the ALL tab selected in the Properties box, and look again. If it's still not there, then it's not a Combobox. All Combos and ListBoxes have a RowSource, where a table, query, or value list determines what choices will be displayed to the user for selection. -- hth Al Camp Candia Computer Consulting - Candia NH http://home.comcast.net/~cccsolutions "SpookiePower" wrote in message ups.com... I'm a bit confused about how you do this. I can see that you have something called "Row Source" in the combobox containing a query. I cant see who this query connect to the two textboxes and then, when I place a combobox/textbox on my form, there is not something called "Row Source" where I can put a query. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Customers- Contracts form problem | GL | Using Forms | 10 | February 7th, 2006 04:05 PM |
Calculated field in pass through query | Vaughan | Running & Setting Up Queries | 7 | January 12th, 2006 02:26 AM |
Code Not Working | DS | New Users | 11 | May 9th, 2005 10:55 PM |
Unable to insert record to Access via SQL from an ASP page | Norman Yuan | General Discussion | 1 | February 2nd, 2005 08:23 PM |
find and replace | ladyinred | General Discussion | 14 | August 12th, 2004 09:35 PM |