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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Over 255 fields in Access Table and Form

Status
Not open for further replies.

OA2ATLANTA

Technical User
Apr 30, 2004
2
US
I need to split my table and form. How do I link my forms so that when I click on the command button to move to Form 2, it pulls up the same record I was working on in Form 1?
 
I need to split my table and form

Are you saying you want to create a front end for you forms and a back end for your tables?

That doesn't have anything to do with:

How do I link my forms so that when I click on the command button to move to Form 2, it pulls up the same record I was working on in Form 1?


Leslie
 
Say on on Form1 you have RecordID as your PK. You should have the same field on Form2 and the default value for the field would be [Forms]![Form1]![RecordID]
 
Something like the following will work. You will have to substitute the specific names, like "txtID", "recordid", "form2", for the real names.

This attempts to save the current record, then open the next form, then set the next form's ID to whatever you have currently open, then closes this form.


[tt]runcommand accmdSaveRecord
docmd.OpenForm "form2",DataMode:=acFormAdd
Forms!form2!RecordID = txtID.Value
DoCmd.Close acForm, Me.Name[/tt]


There are many problems with this entire idea. What happens if your user saves the first part properly, but doesn't finish saving the second form? How are you going to handle that? Are you going to let them come back later and re-enter the second part?

Also, what happens if they need to make edits? What happens if they need to delete a record?


There's too much room for user error with this sort of thing. I don't recommend the 'two-form' approach to enter a single body of data. And no, I don't know your specific situation enough to give better advice.


Pete
 
look at form / subform (master-detail) relationship. somewhat covered in the Wizzards and the Sample dbs w/ Ms. A.

before getting in much deeper, try reading at least a little re relational database thoughts. most 'exercises' in generating 255 ANYTHINGS is somewhat likely to be not following the usual / standard procedures.





MichaelRed
mlred@verizon.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top