Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Open Subform with new record - Access 2003


(!)

steeleye's Avatar
steeleye steeleye is offline
Computer Specs
Junior Member with 2 posts.
THREAD STARTER
 
Join Date: Mar 2009
04-Mar-2009, 05:12 PM #1
Open Subform with new record - Access 2003
I have a form with a subform. When I open the form, I want the subform to display a new record. How do I make that happen? If I use a macro to "open new record" when the form opens, it displays a new record for the form as well as the subform. I want only the subform to display a new record.
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,538 posts.
 
Join Date: Mar 2005
Location: UK
05-Mar-2009, 07:08 AM #2
I am not quite sure about the logic of what you want to do, I would have thought you would want to see historical records, but there are 2 ways to do what you want one is to set the Subform's "Data Entry" property to "Yes", this means that it can only accept new records and display those entered since the Form was opened, not older records.
The other involves using VBA code in the Subform's "On Load" event procedure which says
me.newrecord

The VBA method should still have the old records available, just move to a new record.
__________________
OBP
I do not give up easily
steeleye's Avatar
steeleye steeleye is offline
Computer Specs
Junior Member with 2 posts.
THREAD STARTER
 
Join Date: Mar 2009
05-Mar-2009, 04:08 PM #3
Thank you. I tried both methods. Both of them cause a new record to open in both the form and the subform. I want only the subform to display a new record. Since it can be accomplished with a button, it must be possible to automatically have it open to a new record when the form/subform first opens. Is there a way to do this?
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,538 posts.
 
Join Date: Mar 2005
Location: UK
06-Mar-2009, 07:33 AM #4
Did you put the VBA code ONLY in the SUBFORM?
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑