Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Forms

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-24-2009, 06:07 PM
wabbalee wabbalee is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Location: brisbane, australia
Posts: 5
wabbalee is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 06-24-2009, 06:34 PM
marianne marianne is offline Windows XP Access 2003 (version 11.0)
Competent Performer
 
Join Date: Mar 2009
Location: Asia Pacific Region
Posts: 151
marianne is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 06-24-2009, 08:04 PM
wabbalee wabbalee is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Location: brisbane, australia
Posts: 5
wabbalee is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 06-27-2009, 01:53 PM
wabbalee wabbalee is offline Windows 98/ME Access 2003 (version 11.0)
Novice
 
Join Date: Jun 2009
Location: brisbane, australia
Posts: 5
wabbalee is on a distinguished road
Default

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If duplicate record, go to original record islandboy Access 51 06-02-2010 02:17 PM
make Add Record button work janjan_376 Forms 3 06-05-2009 02:22 AM
If duplicate record, go to original record BigBear Forms 1 03-30-2009 07:27 AM
Deleting Record Contents, not complete record... Charles Waters Access 2 06-24-2008 10:00 AM
Yes/No field in a table-Make exclusive or default? Karl H Access 1 12-09-2005 06:27 PM


All times are GMT -8. The time now is 02:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.