Form opens to blank record

I have a front page (a form) and my main database linked via a command button 
- it keeps opening on a particular record and I want it to open onto a blank 
record - how do I go about changing this?

Thanks
C

(P.S. only a shakey understanding of code so if answer includes this - go 
easy on me and explain! Thanks)
0
Utf
4/17/2010 3:25:01 PM
access 16762 articles. 3 followers. Follow

2 Replies
910 Views

Similar Articles

[PageSpeed] 33

When you say:

" I have a front page (a form) and my main database linked via a command 
button..."

you are not talking about the use of Microsoft Office FrontPage, are you?
http://www.amazon.com/Microsoft-FrontPage-2003-OLD-VERSION/dp/B0000AZJV8

I *think* you mean a switchboard type form that opens when the database is 
opened. This switchboard form includes a button to open a different form. It 
is this different form that you want to open in AddNew mode. Is this correct? 
If your answer is "yes", there are three ways to accomplish your goal:

1.) Set a form property for Date Entry to Yes. You can display the 
properties dialog by pressing the F4 button when you have the form open in 
design view. This property is found on the Data tab, when you are displaying 
the properties for the form itself (not for a section or control on the form).

2.) Use a macro to open the form in AddNew mode
Action: OpenForm
Data Mode: Add  <---Found in the lower half of screen, once you select 
OpenForm.

3.) Use VBA code with the optional 

    DoCmd.OpenForm "FormName", DataMode:=acFormAdd

where FormName is the actual name of your form. For example:

Option Compare Database
Option Explicit

Private Sub cmdAddJob_Click()
On Error GoTo ProcError

   DoCmd.OpenForm "frmJobs", DataMode:=acFormAdd

ExitProc:
   Exit Sub
ProcError:
   MsgBox "Error " & Err.Number & ": " & Err.Description, _
          vbCritical, "Error in cmdAddJob_Click event procedure..."
   Resume ExitProc
End Sub



Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Confused87" wrote:

> I have a front page (a form) and my main database linked via a command button 
> - it keeps opening on a particular record and I want it to open onto a blank 
> record - how do I go about changing this?
> 
> Thanks
> C
> 
> (P.S. only a shakey understanding of code so if answer includes this - go 
> easy on me and explain! Thanks)
0
Utf
4/17/2010 7:29:02 PM
Correction:

1.) Set a form property for Date Entry to Yes.

Should have read:

1.) Set a form property for Data Entry to Yes.
 

Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Tom Wickerath" wrote:

> When you say:
> 
> " I have a front page (a form) and my main database linked via a command 
> button..."
> 
> you are not talking about the use of Microsoft Office FrontPage, are you?
> http://www.amazon.com/Microsoft-FrontPage-2003-OLD-VERSION/dp/B0000AZJV8
> 
> I *think* you mean a switchboard type form that opens when the database is 
> opened. This switchboard form includes a button to open a different form. It 
> is this different form that you want to open in AddNew mode. Is this correct? 
> If your answer is "yes", there are three ways to accomplish your goal:
> 
> 1.) Set a form property for Date Entry to Yes. You can display the 
> properties dialog by pressing the F4 button when you have the form open in 
> design view. This property is found on the Data tab, when you are displaying 
> the properties for the form itself (not for a section or control on the form).
> 
> 2.) Use a macro to open the form in AddNew mode
> Action: OpenForm
> Data Mode: Add  <---Found in the lower half of screen, once you select 
> OpenForm.
> 
> 3.) Use VBA code with the optional 
> 
>     DoCmd.OpenForm "FormName", DataMode:=acFormAdd
> 
> where FormName is the actual name of your form. For example:
> 
> Option Compare Database
> Option Explicit
> 
> Private Sub cmdAddJob_Click()
> On Error GoTo ProcError
> 
>    DoCmd.OpenForm "frmJobs", DataMode:=acFormAdd
> 
> ExitProc:
>    Exit Sub
> ProcError:
>    MsgBox "Error " & Err.Number & ": " & Err.Description, _
>           vbCritical, "Error in cmdAddJob_Click event procedure..."
>    Resume ExitProc
> End Sub
> 
> 
> 
> Tom Wickerath
> Microsoft Access MVP
> http://www.accessmvp.com/TWickerath/
> __________________________________________
> 
> "Confused87" wrote:
> 
> > I have a front page (a form) and my main database linked via a command button 
> > - it keeps opening on a particular record and I want it to open onto a blank 
> > record - how do I go about changing this?
> > 
> > Thanks
> > C
> > 
> > (P.S. only a shakey understanding of code so if answer includes this - go 
> > easy on me and explain! Thanks)
0
Utf
4/17/2010 7:34:01 PM
Reply:

Similar Artilces:

Report
I want to build (1) report and have my Record Source be one of three queries based on a selection in an option box on a form. Can I do this? If so, do you have any coding that might get me started? OR Do I need to create three reports and use each query as the record source? Thanks If you have Access 2003 + you can use Reports!MyReportName.RecordSource = "MyQuery" where MyQuery is the name of the query you wish to change to. I don't know if it works with earlier versions. Evi "NEWER USER" <NEWERUSER@discussions.microsoft.com> wrote in message news:6C9AA...

faxing form
Is there a way to fax the form page via the fax modem on my computer? Create a report based on your form then fax the resulting report. Take a look at http://support.microsoft.com/Default.aspx?kbid=231797 hopefully it is what you are looking for. -- Hope this helps, Daniel Pineault If this post was helpful, please rate it by using the vote buttons. "He cries for help" wrote: > Is there a way to fax the form page via the fax modem on my computer? "He cries for help" <Hecriesforhelp@discussions.microsoft.com> wrote in message news:252D07EA-5886-4B0C-99...

how I can sum or subtract 2 or 3 field in access in any record
hi I want know that why there is NOT any relationship between access and excel and how I can sum and subtract 2 or 3 filds in access in any record thanks hadi_khodaparast@yahoo.com Hello Hadi - I'm not sure I understand exactly what you are asking, but Excel is *not* a 'front end' for an Access database. You can use Excel to query the db & copy Access data into a workbook in several ways. That copy of the data can be used for calculations, but the data *doesn't* get changed in the Access file. Although the modified results can be imported to Access it may very well be t...

reference to master form
Hello there I have master form and inside there is subform. If an event procedure uccur on subform, how can i get refence to the master form in order to change there things when the name of the master form is diffrent always? Roy Look in Access HELP for the "Parent." property. Your code will look something like: Me.Parent.... from within the subform. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "Roy Goldhammer" <roy@ho...

Auto Populated a Table From SQL View When New Record Shows in View
I have a table that populates specific data from a SQL view when I manually run an append query - works fine. What I really need to do is have that table populated automatically the moment a new record appears in the view - hands-off on my part. How could I best do this? Do you mean that you have a link to a view in an SQL Server database somewhere? If so, you could have a procedure that kicks off according to a schedule. But as far as having the external data source inform the Access database of a change - don't know if that's possible or not... "meangene&q...

Money 2006 won't open
Recently had problems with the IE8 upgrade. It screwed up everything so much that I'm back with IE6, which seems to be working OK. But now MS-Money won't open. The msmoney.exe file is running because I can see it in Task Manager. Even when I end the process in Task Manager, the program still won't open on the desktop. Rebooting doesn't solve anything. Any ideas? Windows XP, SP3 Have you tried: 1) Opening the Money Sample data file? (This will isolate problems with your data file from problems with the application itself.) 2) Reinstalling Money? "snavegerg...

How can I refresh the master form from a subform?
Hello. On the After Update of the subform I am trying to refresh the Master form. I have tried things like Docmd.requery and Me.Refresh, but not sure what I am doing. Can you help me with this? Thanks. Iram Iram wrote: >On the After Update of the subform I am trying to refresh the Master form. I >have tried things like Docmd.requery and Me.Refresh, but not sure what I am >doing. Try using: Parent.Requery -- Marsh MVP [MS Access] ...

Modal Form from a child form
Hi, I have a little problem, I have a MDI form (Main Menu), this form open a child form (A), and I need to open a form B as modal form from form A. I can to this with showDialog(), but it open form B outside MDI form (Main Menu) and it is showed on the windows bar as another application opened. So the question is, there are any way to open a modal form from a child form inside a MDI form? Thanks El Alquimista wrote: > Hi, I have a little problem, I have a MDI form (Main Menu), this form > open a child form (A), and I need to open a form B as modal form from > form A. I c...

Error: "Updated 18040 global customer record(s) in store database"
At one store, when ever HQ Client processes a worksheet it also updates thousands of customer records every time, bogging down the system. The result is that SQL and HQ Client hog resourses to the point that requests from other registers time out and POS crashes, until the worksheet is done processing. This happened once a year ago but nobody can remember how we fixed it. Any thoughts? Thanks. Mark L According to the dealer manuals you should have HQ client on a separate PC. Not on the one with the MSDE running on it. Try moving it to a less busy machine. Or poll only after hours,...

Data source for PivotTable-Form in ACCESS 2000
Hi, this drives me crazy, 4 years ago I defined in an ACCESS 2000 application a "PivotTable-Form". The resulting EXCEL table inclusive the "Data refresh" works perfect. I now want to update/change the query for the "Data Source" but cannot find which query is behind the "PivotTable-Form" or behind the resulting EXCEL spreadsheet. When editing the properties for the "PivotTable-Form" or the EXCEL spreadsheet the "Data Source" is always blank. Question: Where does Access 2000 or EXCEL 2000 hide the respective data source (Query)...

double opening files
When I try to open an Excel file, MS Excel seems to open the document twice, thereby creating an error the second time it opens and will only open a read-only document saying someone else has it open. Is this is BUG and is there a PATCH I can download? This is with MS Excel 97 on an NT platform thanks Elaine ;) I got a similar problem using Excel 97 on an Windows XP machine, which was soved by uninstalling then reinstaling Excel 97. hth AndyO "elaine" <anonymous@discussions.microsoft.com> wrote in message news:0b0c01c3b03f$cdbd2860$a301280a@phx.gbl... > When I try ...

Media players opens and keeps trying to refresh about 5 times a mi
I have done numerous spyware chaecks all showing nothing detected I have eliminated any options in the media player that would have it trying to check for updates or web items. Completely at a loss and extremely unhappy the microsoft site does not have an answer. Acer Exyenza Laptop with Win XP , Office 07 and player 11 any help guys? in the time in took to type this meassage the player popped up three times Try disabling (unchecking) all active WMP plug-ins in WMP's Options. If you download and run Process Explorer - http://technet.microsoft.com/en-us/sysinternals/bb8...

error opening ppt file
I have office 2007 installed but when i try to open a ppt file created by some one it says powerpoint can't read the outline . No text converter is installed for this file type. karan In article <a888f8cd-1391-4124-80c0- 631197290d7a@y28g2000prd.googlegroups.com>, Guddu wrote: > I have office 2007 installed but when i try to open a ppt file created > by some one it says powerpoint can't read the outline . No text > converter is installed for this file type. Have a look here: "PowerPoint can't open the type of file represented by [FILENAME]"...

In what order do installed AddIns open?
I had no joy with my other post 'Trying to read CustomDocumentProperties of an open 2007 AddIn Options ' so I'm trying another tack... To work around a problem I'm having, since upgrading a complex tool to Excel 2007, I need to ensure that my Version Checker AddIn always opens before my Engine AddIn. Is there any useable logic that dictates the order in which Excel opens its installed AddIns (e.g. alphabetical, order of installation, position in list) or is it one of those unknown internal processes that will forever remain a mystery? Br, Nick. First Com...

Page not found error when opening business portal
Hi We're trying to install Invoice Approvals and Accruals 8.0, sharepoint services sp2 and Business Portal 2.5 Feature Pack to work with Great Plains 8.0 We can install Sharepoint services and Invoice Approvals and Accruals ok and they work fine However, when we install Business Portal and browse to http://servername/sites/businessportal/ We receive a "page not found" error screen We've tried several things but nothing seems to work Sharepoint services is installed in server farm mode and has been configured correctly (as far as I can tell) Any help would be great...

Outlook message bodies Blank
When I open my email in outlook the body is empty. I seem to remember somethig about my AVG doing something. Any Ideas how to fix this? Thanks Disable the email scanning feature in your anti-virus software. (For example, in AVG, uncheck certify under the email scanning settings.) You'll still be protected by its other features and by Outlook's own security, and new messages shouldn't lose their bodies. Messages you've already received, though, can't be repaired. Hal -- Hal Hostetler, CPBE -- hhh@kvoa.com Senior Engineer/MIS -- MS MVP-Print/Imaging -- WA7BGX http://w...

Problem opening up current Excel wksht to mail merge in Word
Hi, I have Microsoft 2007. I created a list in Excel with clients' name, address, city, state, zip. Then, in Word I go to Select Recipients, locate the Excel file and click open. Here's the problem: a Select Table box appears with Sheet1$, Sheet2$, and Sheet3$ as options. clicking on any of the three results in NOTHING. Nothing at all appears! I'm not sure what the problem might be. Thank you for the help! Rachelle ...

Cash Drawer won't open on transaction
Our client just replaced a PC after a H/D failure and everything is back up and working other than the cash drawer. It's connected to a Star SP200 serial printer on COM1. The printer works fine. The printer and the drawer both test fine from the Star OPOS configuration utility. Also, both are visible and test fine from the device screen in Store Ops (Shift + Ctrl + F5). We've already removed and reinstalled the Star drivers and tried a couple different versions. So now what...? BMI, Did you install Star's Cash Drawer OPOS driver too? Look in the Star folder for the Cash ...

vb script for opening notepad
Hi, I am a newbie to vb...Can somebodyprovide me a simple vb script for opening notepad in vista using windows shell Thanks VB baby "Melvin" <whereismelvin@gmail.com> wrote in message news:41a15213-b062-41f5-8525-7eb95c68864a@s22g2000prd.googlegroups.com... > Hi, > > I am a newbie to vb...Can somebodyprovide me a simple vb script for > opening notepad in vista using windows shell What version of VB are you planning to use? This group is for VB classic(VB6 or lower) which is very different from VB.Net(sometimes called VB 2005/2008). If this ...

Deleting Blank lines with VBA
Help I have a macro that runs multiple formulas. However, when the formulas are finished I am left with about 64000 blank lines. I am unable to insert a row on the worksheets as I get a Run-Time Error 1004 (Try to locate the last Nonblank Cell using CTRL-END). Here is a same of some of the formulas I am running ( the macro is very large). ActiveWorkbook.Names.Add Name:="TrunkFormulaI", RefersToR1C1:="=Trunks!R1C27" ActiveWorkbook.Names.Add Name:="TrunkFormulaJ", RefersToR1C1:="=Trunks!R1C28" ActiveWorkbook.Names.Add Name:="TrunkFormulaK&qu...

Tying tables to forms
I have four connected tables that work well as table input but when I put them in a form some of the fields will not let me make entries. Does this happen because I am using the Id fields and subsequent data from the wrong tables? -- Taylor It sounds like you have created a non-updatable form. One cautionary note first: Don't tie your forms directly to the tables. Use queries instead. The queries will act as a stop light for which data is written and when. If more than one person tries to make a change to the same record at the same time, you will run into problems. From wha...

Investment Account Summaries are always blank
I am a brand new user to Money 2006. After the very first time I set up my Ameritrade brokerage account, it neatly listed my positions in the account summary (after clicking on the account from the account list). Unfortunately, that was the only time my holdings were displayed in the summary. Now the summary is always blank, and I have to click on Investing Tools --> Portfolio Manager to see the positions. I have no idea what's wrong. I even setup a manual (non-linked) investment account and it does the same thing, it wont display my holdings in the account summary. I have ...

Using Excel to design business forms
I have been using excel hit and miss to design business forms. I have been pretty successful but in many places I have found myself doing many inelegant things to get stuff to layout. Is there a good place to start looking to see how this is done properly, as I have seen many well done forms produced in excel. ...

Cannot view any form in crm 3.0
We have just installed CRM 3.0 on MS server 2003. I have created an account which has a system administrator role assigned to it. The issue is that when I open CRM web (on the server) when I select account, contact, activities, calendar etc... I get the following error: An error has occured. For more information, contact your system administrator. Now if I open CRM web using an account which has restricted access mode ticked, I don't get any errors, everything opens fine. The problem is that with an restricted access code i can't do much. I have tried assigning different roles ...

Stop Buttons showing when opening up form
I have a button on my Main Start up page that when click makes these buttons visible, but when I open up my DB they automatically show on start up, is it possible they not be visible till I click ckbHelp.......Thanks for any Help.....Bob Private Sub ckbHelp_Click() If ckbHelp = True Then cmbHelpNewHorse.Visible = True cmbHelpActFinHorse.Visible = True End If If ckbHelp = False Then cmbHelpNewHorse.Visible = False cmbHelpActFinHorse.Visible = False End If End Sub Bob, In design view, set the property pf the *button* Visible=No Regards/Jacob "Bob" <xxx@xx.xx> wrote i...