Results 1 to 2 of 2
  1. #1
    harritwo is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2016
    Posts
    1

    Need a Unique number based on two other fields


    I am attempting to build a database for asking questions of our customer.

    What i am needing is how do i accomplish this task?

    The field "Question Number" is sequential based on the Vessel and Contract Number.

    For Example-

    USS Neversail Contract-123 Question 1
    FV Sad Day Contract 234 Question 1
    USS Never Sail Contract ABD Question 1
    USS Never Sail Contract 123 Question 2
    USS Never Sail Contract 123 Question 3
    FV Sad Day Contract 234 Question 2

    Currently the Vessel and Contract number are selected by a Combo Box.

    Attached is a Sample of the Database i have built so far. Any help is greatly appreciated. I know next to nothing about Macro's and VBL so i will need very specific examples, instructions on how to accomplish this task.Click image for larger version. 

Name:	Capture.jpg 
Views:	8 
Size:	73.8 KB 
ID:	25489Click image for larger version. 

Name:	Capture1.jpg 
Views:	8 
Size:	221.1 KB 
ID:	25490

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Could you count the number of records already in the table based on the vessel name they select, then add 1 to it for your next questions number? Something like:

    me.QuestionNumber = me.VendorName & " " & me.ContractName & " Question " & DCount(me.VendorName, "MyTable", "VendorName = '" & Me.VendorName & "'") + 1

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-06-2014, 01:25 PM
  2. Replies: 12
    Last Post: 08-25-2014, 07:32 AM
  3. Form pulls info into fields based on ID number
    By arothacker in forum Forms
    Replies: 3
    Last Post: 02-27-2014, 04:13 PM
  4. Replies: 4
    Last Post: 11-20-2011, 01:08 PM
  5. Replies: 24
    Last Post: 09-01-2010, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums