• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

After subform is made visible, it is not displaying linked records

Great Day, I have a form that permits the user to create a work order for vehicle repair shop. There is a subform that allows the user to enter the types of service needed: Oil Change, replace brake pads, tune up etc. Each field can be associated with 1 or 3 categories:

1. Estimate (Is this service need part of the estimate);
2. Repair Order/Invoice (Is this service need part of the repair order);
3. Recommended (Was this service need something that the technician discovered while (let's say) changing the oil, and makes the recommendation to the owner. In this case, the tech may see that the oil pan gasket needs to be replaced).

Each of these three categories are Yes/No data types. There could an  instance when an owner comes in and wants an oil change and a transmission flush, but also hears a squeak and wants the technician to find out what it is. The technician may find that the squeak is a bad wheel barring and the cost may be $350. Although this will be part of the estimate, the owner may decide to get the work performed at a later date, so replacing the wheel barring does not become a part of the Repair Order/Invoice. Consequently, in this case, category 1 and category 2 will be clicked for the Oil change and transmission flush, but the replacement of the wheel barring will only have category one (estimate) clicked.

So the form includes all items - estimates; repair orders, and service needs that are recommended by the technician. What I am trying to do is place 3 command buttons on the main form that will filter the form to only display records for one of the three categories, and a fourth button to show all categories. I have placed three copies of the subform overlaying the first subform (all categories), and here is the copy of the code for one of the buttons (all of them are virtually the same)

All of the subforms are linked to the parent by JobID, but after the buttons are clicked, the proper subform comes up, but I am not getting the records linked to the JobID. It is basically an empty form.

Any suggestions on how I can get all of the subforms to show the records for that particular JobID. Thanks in advance for your assistance.

r/David

Private Sub btnEstimateFilter_Click()
Me.frmScopeOfJobSub1.Visible = True
Me.frmScopeOfJobSub.Visible = False
Me.frmScopeOfJobSub2.Visible = False
Me.frmScopeOfJobSub3.Visible = False
Me.Refresh
Me.Requery
End Sub

Open in new window

0
yddadsjd95
Asked:
yddadsjd95
  • 5
  • 2
1 Solution
 
mbizupCommented:
Are these true subforms (forms embedded in a main form)? Or are they pop-up forms?

For starters, make sure that the Data Entry property of the subforms is set to "NO".
0
 
yddadsjd95Author Commented:
I initially created the form with only one subform with the Master and Child fields linked on JobID. After copying this subform and renaming it 3 times, I placed them on the main form and overlaid them all on the same spot. They still have the same attributes as that first subform. So I would think that all of them are embedded, but I do know that they are not subforms. the Data Entry property for all of the subforms have been set to "No."

Thanks for your assistance thus far,

David
0
 
yddadsjd95Author Commented:
I've added a 4th subform, so this 4th one will display all of the categories, but Is till need help on how to make these subforms display at the appropriate time.

Thanks,

David
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
yddadsjd95Author Commented:
Eureka, I figured it out! I had two fields whose names were similar: JobID and JobTypeID. When I placed the three copies of the subform on the parent form with the subform wizard, I linked them by JobTypeID instead of JobID.

The more I learn, the more I understand that Access will do "exactly" what you tell it to do :-). Thanks anyway mbizup.

r/David
0
 
yddadsjd95Author Commented:
I figured out the problem by changing the link between the child and master forms.
0
 
mbizupCommented:
Sorry I wasn't able to help out on this one.  I'm surprised nobody else jumped on it.

Just FYI, anytime a question goes 'neglected' like this for more than 24 hours, you can use the Request Attention button to let the Moderators know that you need additional help, and they will do what they can to draw more attention to your question.
0
 
yddadsjd95Author Commented:
Thank you for the advice mbizup. I'll definitely try it the next time.

Have a great day!

David
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now