Results 1 to 4 of 4
  1. #1
    wabbalee is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Location
    brisbane, australia
    Posts
    5

    How to make a form default to new record rather then showing the first record...


    Hello,

    I have build a simple 3 table database at my work for us to replace our ancient logbooks. We are using it and it works pretty good, that is my colleagues and I are happy with the end result.

    but I am by no means an expert in this field and we have a small problem: when the form for logging is initially started it shows the first record in the table and my colleague overwrote that accidentally.

    my question:

    How to make a form default to new record rather then showing the first record from the table each time the form is initially opened?

    in my search for the answer here I found a new term (for me) but its name already makes me think of a modification for my purpose: "switchboard"

    I just made another form with buttons to start a form to fill in the appropriate table, that I would almost want call a switchboard

    so perhaps my second question would be:

    what is a switchboard?


    Thanks in advance
    Ron

  2. #2
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    there are two things.

    1. you can code your form on On_Load event of your form

    docmd.GoToRecord,,acNewRec

    2. Or if you dont know how to code, you can set your form DATA ENTRY on DATA Tab to "Yes" so that you can only add new record and not even show all previous records.

  3. #3
    wabbalee is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Location
    brisbane, australia
    Posts
    5
    These sound like good solutions, my problem now is that I am not a windows and access user at home, (I use Ubuntu and OpenOffice, sorry don't mean to swear here) I will get back to my work on Saturday night and will give this a try.

    Thank you Marianne
    Ron

  4. #4
    wabbalee is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jun 2009
    Location
    brisbane, australia
    Posts
    5
    Thank you Marianne,

    No, I do not know how to code, but you sure hinted me in two good directions:

    1 I typed in your line of code:

    docmd.GoToRecord,,acNewRec

    as you wrote it, in the Form>Event>On_Load section. That didn't work, and
    probably because yours truly placed the code where it does not belong. A message
    saying that Macro 'docmd' did not exist made me check out the Macro section of
    Access where I created a new Macro (I think..) using the drop down boxes:

    under 'Action' I chose 'GoToRecord'
    Object type: Form
    Object Name: frmMyFormName
    Record : New
    Offset : (left blank, and not a clue what it is anyway)

    saved the macro as 'docmd' and under the Form's properties in the
    Form>Event>On_Load section I just typed 'docmd'

    Ran it and it works!

    2 changing DATA ENTRY to "yes" on the DATA tab on another form with the same
    problem did the same trick, as you said in your second suggestion.

    thanks again.
    Ron

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

Similar Threads

  1. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  2. If duplicate record, go to original record
    By islandboy in forum Access
    Replies: 51
    Last Post: 06-02-2010, 04:17 PM
  3. make Add Record button work
    By janjan_376 in forum Forms
    Replies: 3
    Last Post: 06-05-2009, 04:22 AM
  4. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM
  5. Replies: 1
    Last Post: 12-09-2005, 09:27 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