Small problem / small brain

Renoir

Registered User.
Local time
Today, 07:16
Joined
May 31, 2007
Messages
42
I want to achieve a simple thing here.
I have a form with lots of fields from 1 table.
In the first form I show bout 25% of the information from the single table.
When a particular record is showing, I would like to open another form with supplementary information from the same table but only related to that record by clicking on a button.
I have the query that comes up with the filtered record but can not seem to populate the second table with it.
Any help will be greatly appreciated.
Cheers,
Renoir
 
What not show them all by using a tab control?
 
That was my original approach and I changed it because Access suggested the form was too complicated (large, I guess). It also introduced some other problems. In any case, not the solution here but thanks for your reply.
 
In that case, I think the way I would do this is to have the second forms recordsource filtered using the pk of the first form.
 
Thanks Ken

Have it working "somewhat".
I used this for the button that opens the other form and set the sourse or the form to the query.

The only thing is that the query (although working well) opens rather than "executes".:confused:

Private Sub cmdOpenClientDemographics_Click()
On Error GoTo Err_cmdOpenClientDemographics_Click
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "qryClientDemographics"
DoCmd.OpenQuery stDocName, acNormal, acEdit


stDocName = "Clients Contact Demographics"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenClientDemographics_Click:
Exit Sub
Err_cmdOpenClientDemographics_Click:
MsgBox Err.Description
Resume Exit_cmdOpenClientDemographics_Click

End Sub
 
Hey, if you're looking for a small brain, I'm your man! :p

What is the SQL of that query (basically, is it an action query or just a SELECT query)? It sounds like it's a SELECT query, so what is it you expect it to do?
 
Just a query that I did in query design - the icon looks like 2 pages overlapping.
How can I find out?
 
SELECT Clients.ClientID, Clients.ClientNumber, Clients.ClientName, Clients.Concessions, Clients.QuickLodger, Clients.BusinessCategory, Clients.BusinessType, Clients.EntityType, Clients.EmploymentSize, Clients.TurnOverSize
FROM Clients
WHERE (((Clients.ClientID) Like [Forms]![Clients Contact].[ClientID] & "*"))
ORDER BY Clients.ClientName;
 
That's a simple SELECT query, so there's nothing to "execute". If that's the source of the second form, you don't need those 2 lines at all. If you're trying to do what I think you are, this may help as well:

http://www.baldyweb.com/wherecondition.htm
 
That was just what the doctor ordered. The reference explained what I needed to achieve as if someone was looking over my shoulder.
Thanks to all contributors (another little step closer)
Cheers,

Renoir
 
Excellent, glad it helped. I'm just getting that site going, so it's nice hear it helped you.
 

Users who are viewing this thread

Back
Top Bottom