Results 1 to 5 of 5
  1. #1
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88

    if Open Form then New Record

    hello, i have 2 forms using 1 conjunction table, is there a way of setting default value of the AutoNumber Text-box within a form to New ? when opening the form ?





    thank you.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    What do you mean by AutoNumber textbox? This is a custom unique identifier, not an autonumber field?

    Could set any value you want into the field.

    How are you moving to new record row?
    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
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    nothing i think i may have over complicated it, its rather simple, its just a conjunction table, embedded in a form where i can choose fields and click the new button and add another record, but im looking for a way, where when i open the form it will go to a new record automatically, much like opening a form in add mode, but i want to be able to edit also, so its edit mode but when i open the form it will show me a new record

    which would look similar to something like, form> on open event, go to, new record,

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Code in form Open event.

    DoCmd.GoToRecord , , acNewRec

    Unless it is a subform, I think gets more complicated. https://www.accessforums.net/access/...red-40057.html
    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
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    it worked ! thx !

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

Similar Threads

  1. Replies: 3
    Last Post: 11-01-2013, 10:16 AM
  2. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  3. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. If record does not exist, open add new record form
    By RobertIngles in forum Programming
    Replies: 2
    Last Post: 02-01-2011, 08:47 AM

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