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

Open new form and display all records

Status
Not open for further replies.

Shal2

Programmer
Dec 3, 2001
52
NZ
Hi,

I have two forms.Contacts and Events. I am opening Events form from Contacts form and the form link criteria is Contactid.So right now I am able to open the Events form form contacts and see the one particular record.But I want to be able to see all the records in the Events form, not just the one record that I open from contacts.I should be able to see that one record and from there go on and see the next or previous recors.How can I specify this in the event procedure code?Is this related to filter??
Thank you,
Shalini

 
When you say that the "forms link Criteria is ContactID" are you referencing the property of a subform? Have you created a subform on the Contact form for another Event form to be displayed? You see that would probably be the best way to display a one to many relationship as you have described.

Please give me a little more information concerning your situation. Bob Scriver
 
Hi Bob,
Thank you for your reply.
What I have is two separate forms. I am trying to open one from the other using a push button which has the following procedure.

stDocName = "Events Data Entry Form"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec


So I am trying to open the events form using the stLink Criteria.What is happening is, it opens the form and is showing one record that I ahve specified in the above code. I want to be able to see that record and also the other records when I use the navigation buttons. Is this possible?Both forms are based on tables.

Regards,
Shalini.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top