need a form to display a record for comments

T

TechyTemp

I need to design a form that the warehouse personnel can simply type in a
sales order number. At that point all the info on each line item would come
up with an "explanation" box for the warehouse people to type in comments.

Do I need to set up a query first? or just what do I need to do?
 
S

Sprinks

TechyTemp,

I would create a main Single form based on the Orders table with an embedded
continuous subform based on the detail table, linked by the Order number.
Before creating the continuous subform, add the Explanation text field to the
detail table.

On the main form, place an unbound combo box in the form header to look up
the order of interest. Once the correct order record is found, the
corresponding items will be displayed in the subform.

Some programmers use recordsets to find the appropriate record. Another way
is to simply reopen the form using a Where clause:

On Error Resume Next
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "YourForm"

stLinkCriteria = "[YourPrimaryKey] = " & Me![YourUnboundComboBox]
DoCmd.OpenForm stDocName, , , stLinkCriteria
' Move the cursor to the subform
Me![YourSubform].SetFocus

Hope that helps.
Sprinks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top