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
|
|||
|
|||
Open a record based on a value
I have an order form where in the upper left is a field
called OrderID. This is an autonumber field that is also the primary key in that particular table. It is also the number by which we refer to our orders. How can I set it up so that a user can type in a number here and have it go to that particular order? Or similarly, put something on the main switchboard that says "Go to order #" followed by a text box where the user enters the appropriate order number to open in the Orders form. Thanks! |
#2
|
|||
|
|||
Open a record based on a value
Put this code in the OrderID field's AfterUpdate event:
Me.Form.Recordset.FindFirst "OrderID = " & Me.OrderID I would make OrderID unbound to avoid confusion that can arise from mistakingly replacing OrderID. But I would not at all like to use a design like this because I would need to type in - menaing, remember or manually find first - an OrderID number. In my opinion, it is the database's job to help the user do this. Pavel Dan Cole wrote: I have an order form where in the upper left is a field called OrderID. This is an autonumber field that is also the primary key in that particular table. It is also the number by which we refer to our orders. How can I set it up so that a user can type in a number here and have it go to that particular order? Or similarly, put something on the main switchboard that says "Go to order #" followed by a text box where the user enters the appropriate order number to open in the Orders form. Thanks! |
#3
|
|||
|
|||
Open a record based on a value
Create a ComboBox using the wizard and set it to lookup a value in the form.
-- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Dan Cole" wrote in message ... I have an order form where in the upper left is a field called OrderID. This is an autonumber field that is also the primary key in that particular table. It is also the number by which we refer to our orders. How can I set it up so that a user can type in a number here and have it go to that particular order? Or similarly, put something on the main switchboard that says "Go to order #" followed by a text box where the user enters the appropriate order number to open in the Orders form. Thanks! |
Thread Tools | |
Display Modes | |
|
|