Results 1 to 2 of 2

Thread: Noob Question

  1. #1
    Join Date
    Oct 2011
    Posts
    56

    Unanswered: Noob Question

    Trying to Create a makeshift stock control/order database,

    base has these tables (only listing important ones) and each tbl has a form with them

    TblStockControl
    TblBespokeSofa

    TblStockControl has a field "ItemNumber"
    TblBespokeSofa has a field "SofaID"

    BespokeSofa basically creates a new customised item rather than a standard item that can be entered easily. so needs to have a item number when created

    what i want to happen:
    when i open up FrmBespokeSofa, and start creating a record.. i want that "SofaID" created according to "ItemNumber" in [TblStockControl] so that Itemnumber is generating a purely unique item number for each sofa and each other item that may be entered.

    to try and make more sense:

    If there are 10 records in Stockcontrol.. then the New "itemnumnber" that will be genererated for the next record will be 11.. so if i choose to create a sofa in BespokeSofa, i want the SofaID to be 11.. and for the record to appear on the StockControl when enetered.

    Is this possible?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If defining an AutoNumber column can't help, you can always compute the next number is sequence, using a domain function:
    Code:
    NewItemNumber = DMax(ItemNumber, <TableName>) + 1
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •