Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Subform2 change with record select on subform1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NNS2007 - 16 Apr 2008 22:05 GMT
Hi Everyone!

I have a main form with tabs. On the Machine/Service tab I have Subfrom 1
that lists all machines owned by a customer, and subform 2 that lists all
service done on the machines owened by that customer.
Subform 1 is a continuos form showing each machine with model, serial#, date
installed, installer, and notes.
Subform 2 is a datasheet form showing Service ID, Service Type, Tech,
OpenDate, and CloseDate.
Right now all is OK but Subform 2 shows service for all machines owned by
the customer. I want Subform 2 to show service for only the record selcted in
Subform 1. So I can see service performed for each machine the customer has
when I'm on that record in Subform 1. Can anyone please help me here? Thanks!
Fred Loh - 17 Apr 2008 14:51 GMT
i assume machines and services are linked by ServiceID. On the form, in
either tab,  create a textbox. lets call it "txtServiceID". in the machine
subform1, in the "Current" event, write "me.txtServiceID = me!ServiceID.". in
the service subform2, in the "Data" property, set the link child field to
ServiceID and set the link master field to txtServiceID".

fred

> Hi Everyone!
>
[quoted text clipped - 9 lines]
> Subform 1. So I can see service performed for each machine the customer has
> when I'm on that record in Subform 1. Can anyone please help me here? Thanks!
NNS2007 - 13 May 2008 15:25 GMT
Hi Fred! Thanks for the try and I'm sorry I took so long to reply I have been
on the road for most of this time. I wasn't quite clear enough on what I'm
doing I think.
I have a Customers form that has 5 tabs. In order, the first tab is
Customers, then Contacts tab, Notes tab, Calls tab, and Machine/Service tab.
The Machine/Service tab has 2 subforms. The 1st for Machines the customer
ownes and the 2nd for Service performed on each machine. They are both linked
to the CustomerID.
The Record Source for the Machines subform is:
SELECT qrysubfrmMachine.MachineModel, qrysubfrmMachine.CoAddressID,
qrysubfrmMachine.MachineSerialNumber, qrysubfrmMachine.InstallDate,
qrysubfrmMachine.FirstName, qrysubfrmMachine.Notes
FROM qrysubfrmMachine;
This forms View is Continuous Forms

The Record Source for the Service subform is:
SELECT Service.ServiceID, Employees.FirstName, Service.ServiceType,
Service.DateOpened, Service.DateClosed, Service.CustomerID
FROM Employees INNER JOIN Service ON Employees.EmployeeID =
Service.EmployeeID;
This forms View is Datasheet

In the Machines subform I have all of the machines owned by the customer and
in the Service subform it shows ALL service done to ALL machines owned by the
customer. What I want is to have service done for one machine at a time
depending on the record selected in the Machines subform. I don't even care
if the Service subform shows anything before a record is selected in the
Machine subform.
I'm really stuck here!!! I hope someone can help
Thanks again!!!

> i assume machines and services are linked by ServiceID. On the form, in
> either tab,  create a textbox. lets call it "txtServiceID". in the machine
[quoted text clipped - 17 lines]
> > Subform 1. So I can see service performed for each machine the customer has
> > when I'm on that record in Subform 1. Can anyone please help me here? Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.