showing a specific record on a form

andyswinburne

Registered User.
Local time
Today, 10:56
Joined
Sep 29, 2003
Messages
22
I need to be able view a view a particular record, i have created a query that displays the record in the table correctly, but i want to beable to display this result in the form.

This is the SQL for the query if this helps

SELECT Bowlers.[Bowler ID], Bowlers.[First Name(s)], Bowlers.Surname, Bowlers.[Date Of Birth], Bowlers.[Phone Number], Bowlers.[E-mail], Bowlers.[Web Site], Bowlers.Selected
FROM Bowlers
WHERE ((Bowlers.[Bowler ID])=([Forms]![Teams]![BowlerID1]));

I have a form which displays the bowlers ID for each team ([Teams], i basically want to take this ID for a particular bowler and open up the record in the bowlers form showing their details, any help would be appreciated.

cheers

Amdy
 
IF you want to use VB... ignore this ~~~~ i'm a VB newbie. also, i'm not sure if you want the results displayed on the same form as bowlers ID ... if so, disregard this suggestion.

You need one form with a combo box of bowlerIDs and another form with bowlerInfo that will open based on which bowlerID you choose. On the first form, add a combo box using the table containing bowlerID as the source. Add a command button that will open the bowlerInfo form. Make another form and use a query with bowlerInfo and bowlerID to build it. In this query put [Forms]![the name of the first form]![name of your Combo box] in the 'criteria' of the bowlerID field. That's a quick and dirty way to get it done. Make sure that the bound column in the first form's combo box is bowlerID or it won't work.
 
basically all i want to do is to have a command button that will open up the bowlers record and not all records, i could use the ID as a parameter to help in calculations but i can not get the filter part of the DoCmd.OpenForm command to filter the records accordingly, I have tried the following:

DoCmd.OpenForm stDocName, , , "[Forms]![Teams]![Bowler Details] = [Forms]![Teams]![BowlerID1]"

This opens the correct form but all fields are blank, it is basically the same code as the query but just need to know how to display the data in the relevant fields

cheers

andy
 
i don't know how to do it in code :( sorry
 
I didn't read through the whole post, but try:
DoCmd.OpenForm stDocName, , , "[Forms]![Teams]![Bowler Details] = " & [Forms]![Teams]![BowlerID1]
assuming BowlerID1 is a numeric field.
 

Users who are viewing this thread

Back
Top Bottom