Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need subform (datasheetview) to insert numbers in column

Status
Not open for further replies.

Simon22

Technical User
Feb 1, 2001
54
CA
Hi all!!
I am having some trouble with an order form. The form consists of the main form (ClientOrder) which is used to select the client's company address and contact info, and the subform (ClientOrder subform) which is used to select the products and amount. The subform is in datasheet view. You begin by selecting the Prod_ID in a lookupwizard and the corresponding price and description for that product show up in their respective columns. This is no problem. My problem is, each row in that subform needs to have a line number. I have a column for it but I can't use an autonumber because the first order wouold be fine (line1, line2, line3) but any other orders would start at (4, 5, 6, etc.) instead of starting at (1, 2, 3) again.
For this reason, I have a regular number field. The problem is that I don't know how to make access insert the number "1" in the first row of the subform and then 2, 3, 4 etc... as more products (rows) are added.

Any input?
 
link seems to have not copied properly

just go to microsofts knowledge base and find article
Q120913
 
Will this work in Access 2000? I copied and pasted the code but I get "Compile Error: Method or data member not found" refering to 'RS.Findfirst'. I can follow the instructions but I don't know much about VBA so there's no way that I could dissect this. Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top