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

same record - multiple forms

Status
Not open for further replies.

RMOSBY

Programmer
Nov 18, 2002
8
US
I've got two forms - one to locate a record in a table and another to show all of the fields in that record (they are two separate forms and not parent/sub-form). Rather than adding an 'AutoNumber' field and running a 'Seek' or 'Find', it there a way to store the bookmark from the first form and jump to that same bookmark through the second form? From what I've seen, the 'Bookmark' property is only local within a sub. I've tried defining a public string variable to hold the 'Bookmark' value, but it won't work for me.
 
I don't believe there is any good way without using any sort of id field in the table. The way my application was set up I mainly used unbouned forms, so I don't know bounded forms as well as others might - but I can make a suggestion anyways!

Try binding your fields form to a query instead of a table, then on the select form you can edit that query on the fly and save it, then do maybe something like this when you make a selection:
Me!Forms("Form2").requery

And it'll magically work!

I haven't tested or implemented this myself, but that's what I would try first if I were in your situation. =)
 
[tt]
Hi:

Is the first form's entire purpose to find a record in a table? If so, then you could rely solely on the second form and find the record with a text box or a combo box.

Probably whatever you're using in the first form to find the record could be moved to the second form, couldn't it?

Rather than adding an 'AutoNumber' field...You can have a primary key other than an autonumber field. I don't think I've ever worked a table without a primary key, but I'm sure it can be done. Depends on how you want the table to relate to other tables, to reference the records, have a unique record identifier.

If I've understood your question...

[glasses][tt] Gus Brunston - Access2000(DAO)[/tt] Intermediate skills.
 
if ever you go back to school they will tell you taht a table withot a primary index is stupid. it doesnt take much of an effort and when you are working with relational databases (like access) a total must. If anything it speeds up queries. Not having a primary key will take its toll in the end. Believe me ive tried.

BTW bookmarks are strange things made by access (some people even say they have alien origins) they are made whenever access makes a recordset and wont be the same when you open it again. Christiaan Baes
Belgium
"What a wonderfull world" - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top