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!

syncronizing forms

Status
Not open for further replies.

mattpearcey

Technical User
Mar 7, 2001
302
GB
No matter what i do, i cannot get my forms to be syncronized. I have a main form that holds all basic details fo each record, then three other forms that hold other types of data, but i cannot get all the forms to be syncronized so that upon opening each form from the command button i have on the forms, it shows the record that i want. It always goes to the first record.

How can i get over this stupid little problem? Thank you for your help already.

Matt Pearcey
 
Matt,

I found one solution to same problem was to put a command button on the first form to call the others.

i.e. from Command button wizard, choose form operations open form the 'Open form and find specific info to display' then choose the common field to each form etc.

On clicking on button second form is opened in filtered mode to corresponding record of previous form.

Good luck

 
Hi Matt,

There is quite a lot involved to synch forms. First of all, you need your tables to be set up with the proper relationships. Once you do that, try Access help and type in "Synchronize" and click on "Forms". There is everything you need to know there and several examples you can explore. I have pasted a topic below. Hope this points you in the right direction.

Best regards,

Henr¥

From Access Help: Example of using Visual Basic to display related records when you move between records

When you move between supplier records on a Suppliers form, you may want to see the products each supplier carries in a Products form. In the Form_Current event procedure of the Suppliers form, set the FilterOn and Filter properties of the Products form:

Private Sub Form_Current()

' Declare and set a variable to store the WHERE
' clause that describes the records you want to
' display.
Dim strCond As String
strCond = "SupplierID = Forms!Suppliers!SupplierID"

' Use the IsLoaded function from the Northwind
' sample database to check whether the Products
' form is open, then set the properties.
If IsLoaded("Products") Then
Forms![Products].FilterOn = True
Forms![Products].Filter = strCond

End If

End Sub
 
thanks anthony. through looking at the help files, i sort of guessed at it being slightly more difficult than originally planned. I will tread my way throug it eventually, but as you can probably see, i have lots of things going on at once so gettingthem all working is a pain.

thanks for your help again! Thank you for your help already.

Matt Pearcey
 
It also helps to send information from one form to the next using the openargs argument of the docmd.open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top