Results 1 to 7 of 7
  1. #1
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129

    Number Not Populating Control Correctly

    I have a pop up form for generating an Order No, Starts at 10000 by using Format /10000 in table and in forms Format property
    OK that works but I enter a few details on the popup form and write them to the main table and they all work except for the order number
    To exit the popup

    Private Sub btnUpdate_Click()
    Forms!frmMainDel!OrdNo = OrdNo_ID (being the popup's AutoNumber Primary Key)
    Forms!frmMainDel!DateMain = OrderDate (this works)
    ---
    ---
    End Sub
    the popup shows the order as eg..10005 but the main form shows as just 5


    any clues anyone

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Format property setting doesn't change the data. Format function can be used to save modified data.

    Want to provide your db for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129

    Attached DB

    Thanks for your reply
    a very quick pared down DB

    so the Main form Opens - focus is on the order no button(generator) user is to click, fill out details and click button to exit
    the main form is then populated with the details
    though my tblOrderNoNIB has its PK starting at 10000 the populated OrderNo control in frmMainDel is not

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    As stated, Format property setting does not change data. This is why I never format fields in tables or use lookups in tables. I want to see the actual value. The true value in OrderNoNIB_ID field is 5, not 10005. Remove the format setting and you will see this. Apply formatting in forms and reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    Thanks for your quick reply. I thought the / was toooo easy, it just looked like it worked.
    So I have found http://support.microsoft.com/default...n-us%3BQ209696
    to start an autonumber at a selected number.
    Do you think this is what I need to do?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    That is an option. The other is to format this value in forms and reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    Thanks for your help .I tried the append query and that seems to be all OK, a bit of testing and should be good
    Thanks again

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

Similar Threads

  1. Replies: 3
    Last Post: 07-25-2012, 10:35 AM
  2. Replies: 2
    Last Post: 02-29-2012, 01:09 PM
  3. lookup control number on form save
    By jwmo9tt in forum Programming
    Replies: 5
    Last Post: 12-19-2011, 11:44 AM
  4. Populating a combo box with a Calendar Control
    By system243trd in forum Access
    Replies: 0
    Last Post: 12-02-2011, 04:22 AM
  5. Replies: 5
    Last Post: 11-16-2011, 07:30 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