Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open from(s) to current record 1

Status
Not open for further replies.

AidanEnos

MIS
Dec 11, 2000
189
I have 1 table
I have 3 forms that update that table
The forms are set to data entry (is there a better way to force a new record when the first form is open? - going to try making the other forms sub-forms while I wait ;o)
I want to Open form 1 input my data, click a command button that Opens form 2 for the SAME RECORD I was just inputting data for. Then I want another command button that Opens form 3 - again for the same record. I know I can use a query to propmt for the record number - but I'd prefer if it just opened to the current record that was being input so my users don't have to remember or check that they were on record 1347 and input that to continuing inputting data.

Thanks

 
First, why do you have three forms for entering data to one record?

That being said, the 2nd two forms should not be set to DATA ENTRY because what that means is that they are ready to ADD A NEW RECORD. But you are already adding a new record; the 2nd two forms are simply for updating an existing row.

You can have a WHERE statement that does that. But first you have to save the current record or it doesn't "exist" yet.
In your button's OnClick event (substitute your 2nd form name and your RecordID name):

Code:
Docmd.runcommand accommandsaverecord
Docmd.Openform "Form2NameHere",,,"RecordID = " & Me.RecordID


Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Let me start by answering that first question...

I have new customer information form which has about 40 fields for various information, I have an order entry form which has about 40 or more fields as well - finally I have a 3rd page which has primarily an expandable memo field containing aditional order details.

All of this information is part of a single customer order, it cannot feasably fit on a single form - so I figured making multiple pages would allow the user to fill in page 1, click on to page 2 (if this click closed the page 1 form that would save the record then opening pages 2 and 3 would only need to open to the last modified record), click on to page 3 then close the record. I know I could create multiple tables to accomodate all parts of the data, but aside from the few tidbits of functionality I do have most of it working just fine.

It seems like every step forward causes me to take several back... and its's getting frustrating. It's been a long time since I created a database and it's coming back in slow bits and pieces. So I appreciate your patience and assistance.
 
Hi--another option you might want to use is a TAB CONTROL. So users can easily see a variety of info about a single user, but it eliminates all of your multiple form problems.

So like a coupla tabs:

Customer Information
Customer Orders (would have a subform containing multiple orders). On this tab too would be the memo field containing details about the order.

Let me ask you this: you say you have all data in ONE table? So if John Smith has two orders, you have all of John Smith's personal data duplicated on more than one row?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
let me just chew on that for a short while ;)

P.S. I did solve my problem with a macro
OpenForm
GoToRecord Last

couple quick parameter settings and was off to the races... but you make good points - and I did mention I was gonna check out the sub form ideas :)
 
Do you have multiple users? What if:

User 1 adds a new record then goes to the bathroom
User 2 adds a new record
User 1 returns and hits the button, the new form will go to the LAST record (User 2's new record) instead of his record.

Also, what if you make a similar form where people VIEW/EDIT the data instead of just Entering it? the same process would apply - you can't just go to the LAST record, you have to go to the record with the current ID.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 

Ginger's advice is dead on! This is the classic situation for using a Tabbed Control! It's the ideal answer when you don't have enough "real estate" to handle the number of fields you need. As mentioned, you also have none of the hassel of opening multiple forms to the same record. And you have to think beyond moving from FormA to FormB to FormC while entering a new record. That's a big enough aggravation, but at least you know you'll be moving from A to B to C! What about after your records are entered and you need to check up on a customer? Now you may still have to move from A to B to C, but not necessarily in that order! Another aggravation!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top