Displaying Information from one Form to Another VBA Code

  • Thread starter Steve_BridgeGuy via AccessMonster.com
  • Start date
S

Steve_BridgeGuy via AccessMonster.com

Hi,

I am creating a series of pop-up forms that leads from one form to another
based on a table of information related to a single item. Each single item
(each Bridge Name has it's own primary key, i.e., City No.) has distinctive
fields related to specific information such as Geometric Data and Traffic
Data. I've already created the two forms for these two specific information
items related to the Bridge Name and City_No. In the first form, Geometric
Data Form, i've wrote some basic VBA code that finds the record set from the
table related to the control as a Afterupdate Event when I created a Combo
list, listing the City No. and Bridge Name. That event worked like a charm.

' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[City_No] = '" & Me![Combo2] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark.

On the same Geometric Data Form, I have a command button that leads to the
next form, "Go To Trafic Data" from when I click on the button, it takes me
to the new form called Geometric Data.. In that from I have data fields
which is related to the same one Table as Geometric Traffic.

My problem is I can't seem to find a way to display the information from the
Table, or referencing the same single item (Bridge Name and City_No (Primiary
Key) from the Geometric Data Form into the fields in the Traffic Data box.
Is there any suggestions where I can do this?

Any information and suggestions would be greatly appreciated,

Thanks,

Steve
 
D

Daryl S

Steve -

If both forms are really displaying information from the same record of the
same table, then why use two forms? Instead, maybe two tabs on one form.
Then as you scroll to a record on the first tab, it will also be on the same
record in the second tab (since the recordsource is for the form, not the
tab).

That said, if you want to open a form and pass in key values, look up help
on OpenArgs. You can pass values in the OpenForm command, and the new form
can use those values to move to the specific record you want. I think the
button wizard for OpenForm will also ask you if you want to open the new form
with related records.

Hope that is what you are looking for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top