trying to create a form with a tab control

gcrutch

Registered User.
Local time
Today, 01:13
Joined
Jan 31, 2011
Messages
51
Ok guys I need major help!!!

I need to create a form with a tab control that has about 4 tabs.

I have an address view, 3 tables. The reason why I have to use vAddresses as a view is because it is the city's main address database and everyone that uses it in their applications has to use it as a view. Which is fine. Then I have a tables called Services, Carts, Off Street Service. BTW, this is an application that tracks the Big Green Garbage Carts that we all use at our homes.

Here is what I need the form to do. I have a separate lookup form that searches for an address. Once the address is found I need it to go to the Main form and populate any and all information that is associated with that address but I need it to be in the different tabs. The main form will just show the address. and for instance, the services tab will have the billing information and information pertaining to the service; the off street service tab will have the information that pertains to off street service and the Cart tab will have information pertaining to the cart itself.

Here are my tables:
vAddress: AddressID, Address, Unit, Street Name, Street Type, Quadrant, Garbage Route
tbl_Services: ServiceID, AddressID, ServiceStatus, SerialNbr, NbrCarts, ServiceFee, BaseFee, ExtraFee, HURoute, HUAcct, HUClass, BusinessName, Remarks
tbl_OffStreetService: OSSID, AddressID, ServiceID, OSS_Status, StartDate, EndDate, CustName, CustPhone, CartLocation, Remarks
tbl_Carts: CartID, AddressID, SerialNbr, CartStatus, CartStatusDate, CartEvent, CartEventSubType, Remarks

I guess I'm just confused on how to tie all the four tables together to pull the information I need. All of the tables are related. Do I use a query that uses all the tables?

Maybe I'm explaining it wrong but I think I've explained it as best I can......
 
So your main form has your address table as record source, and is filtered by the output of your search form. On that main form, youhvae a tab control. In each tab, there is then a subform, each having the relevant table as record source. Each subform is linked to the main form via the AddressID, and you are done :D
 
thanks I will give that a try!
 
Uhmm, there may be some queries involded (in fact, it's best to use a query as record source for a table, so you can prescribe sorting from the outset). The point is that your tables with services seem related by a ServiceID as well as AddressID . Explain how that is supposed to work, if you get stuck.
 
ok, that works like a charm. My next thing is. I have another form called AddressLookup which gets the address. It is a form that has a dropdown box with the street names and a list box that displays the addresses based on the street name chosen. When the user double clicks an address I want it to go to the form that has the tabs and display the address that was chosen. I hope that makes sense.
 
also I need to be able to update the record on each tab.
 
Look into docmd.openform , where you can specify in the WHERE parameter on which record the form to be opened is to be
 
ok, that worked as well....now how do I update records on the subform
 
should the tables just be related by AddressID? Because everything is based off of the Address. I'm sort of a newbie so I'm trying to get this relational database and database integrity stuff down.
 
what is specifically stopping you with which specific table?
 
How did you make the subforms? They should be linked via the AdressID -access is quite good at doing that - did it ask you whan you dragged your tables onto the form?
 
yes each subform is linked by the AddressID to the main form
 
does every subform on each tab has to be related to the main form in order for it to work?
 
the reason I asked is because. tbl_Service is the only table should be related to vAddresses. tbl_ServiceEvent, tbl_OffStreetService and tbl_Cart should be related to tbl_Services. I just have to remove the AddressID from those 3 tables.
 
I see. ok. just remove tha AddressID from those then. You can lstill ink these subforms to each other:


  1. On the main form, make a textbox and call it txtServiceID (you can make it invisbile later, when all works)
  2. Set its control source to = Forms!nameOfYourMainForm!NameOFtheSubformDisplayingServices.Form!ServiceID
  3. For each of the two remaing forms, type: txtServiceID into the Link Master Fields and ServiceID into the LinkChildFields
When you do that, then whenever you select a record in the subform with services, the other two will only display records with same service ID
 

Users who are viewing this thread

Back
Top Bottom