looking to blank records on "new record" (1 Viewer)

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
If I filled out a form in my database I could not click on the record arrow on the bottom of the screen to look at past forms. I had the "Data Entry" property of the form itself set to "yes". So I set it to "No' and could arrow back to look at other records.

However, this has caused a problem where if I click on "New Form" all of my records from the last transaction "form filled out" are still in there. All fields are already populated on the form. I know I can resolve the issue by going back and setting the Data Entry property to "yes" but hoping that I don't have to do that and can find a different solution.
Thanks!
 

Catalina

Registered User.
Local time
Today, 02:20
Joined
Feb 9, 2005
Messages
462
You want to see all records and be able to add a new one, is that correct?

Catalina
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
I want to be able to use my record selector and see past records "in form view" but when I open a new form or select new form the records are already populated with the last transaction that took place. I'm no so sure I'm explaining it right.

If I set the form data entry to "yes" then I can't see past records throught the record selector arrow on the bottom of form. If I set it to "no" then I open my form and it's already populated.
 

Monardo

Registered User.
Local time
Today, 12:20
Joined
Mar 14, 2008
Messages
70
So in other words when you open the form you want to automatically go to the new record, but still have option to go to the previous records, is that correct?

If yes, in the On Open event of the form add the following code:

Code:
DoCmd.GoToRecord acDataForm, "YourFormNameHere", acNewRec
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
Yes Monardo that is correct. I want the best of both worlds. I can't help but to think others have run into this because my problems seem like they would happen to many others.
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
Thank you! I already have that code on the cmdNew_Click. I think my problem resides with the subforms not being blank anymore. Should I put the code on the subforms?

Private Sub CmdNew_Click()

DoCmd.GoToRecord acDataForm, "frmPurchaseOrder", acNewRec


End Sub
 
Last edited:

Monardo

Registered User.
Local time
Today, 12:20
Joined
Mar 14, 2008
Messages
70
Why don't you put <DoCmd.GoToRecord acDataForm, "frmPurchaseOrder", acNewRec> in On Open event of the form which needs to jump to new record (which in this case is the subform "frmPurchaseOrder" I beleive)?
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
Thanks Monardo. Now looking at this I have a form with 6 subforms. 5 of the subforms are already populated even with the
DoCmd.GoToRecord acDataForm, "frmPurchaseOrder", acNewRec in the onopen event.

I tried to put it on the subforms but then they are all blank without cells or anything. Also runtime error 2489 the object frmQuantityOrdered isn't open.
 

Monardo

Registered User.
Local time
Today, 12:20
Joined
Mar 14, 2008
Messages
70
Would it be possible for you to attach mdb?
 

Monardo

Registered User.
Local time
Today, 12:20
Joined
Mar 14, 2008
Messages
70
I really don't know.

You could also send it to me in PM I guess
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
It looks like this issue is only for the subforms. If I bind them to the main form will that solve my issue? If so, how can I accomplish this?
 

gizmogeek

Registered User.
Local time
Today, 05:20
Joined
Oct 3, 2007
Messages
95
Would I be able to accomplish this if I took the 5 subforms out, related each table to the main table and added the 5 items quantityordered, totalinventory, requested items, etc... right on the main form itself? If so do I create quantityorderedID, totalinventoryID, etc... in the main table to link each of the tables to the main table?
 

Users who are viewing this thread

Top Bottom