Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the requery subform bug

Status
Not open for further replies.

mxfrail

MIS
Jul 7, 2008
25
0
0
US
I have researched online a bit about requerying a sub form that I still cannot get past.

I have tried many "hacks" to the problem with no resolution.

What I know does not work -

With Forms!frmContracts_SW!sfDetail.Form.Form
.RecordSource = .RecordSource
End With

Forms!frmContracts_SW!sfDetail.Form.Requery
Forms!frmContracts_SW!sfDetail.Form.Refresh
Forms!frmContracts_SW!sfDetail.Form.Repaint
Forms!frmContracts_SW!sfDetail.Form.ReCalc

Can anyone help wit this? I have a form open for a user to make a chance directly in the DB. When they are done they can hit the close button where I want the subform on the previous form to refresh. The DB change is happening but everything seems to be one step behind for instance.

Using numbers -

If I start with num 1 and change it to num 5 nothing happens. If I go back in and change 5 to 3 then 5 will now appear in my refresh.
 
I'm also having this problem, but might have more info to help us get an answer. (I have already checked the names of all forms and subforms, and they are properly being referenced.)

I have four subforms, which are on a subform of a main form. Basically the user's main screen has five subforms which they move between more or less like tabs would work. Each "tab" has some subforms for different types of information.

MainForm:frm_Claim
Subform1:subfrm_Claim_Tab3
Subforms2:subfrm_Party, subfrm_PoliceReport, subfrm_ExtLiab, and subfrm_Ticket

The extra thing I noticed is that both subfrm_ExtLiab and subfrm_PoliceReport are both "Single Forms" that only display one record of information. They requery just fine with one line of code:

Forms!frm_Claim.Form.Controls("subfrm_Claim_Tab3").Form.Controls("subfrm_Party").Form.Requery

(These are explicit instead of implicit because they're part of a loop to do all subforms2 of all subforms1.)

On the other hand, subfrm_Party and subfrm_Ticket are "Continuous Forms" that display one or more records. So I wonder if it has something to do with that? Strangely enough, the "Single Forms" that work have the headers/footers hidden, and all the controls are in the Detail section, so it can't just be a Detail section problem.

Anyhoo, thanks in advance if you can help!
 
I have a vertical scrollbar on subfrm_Ticket, and just noticed that when I click and hold on the slider is shows "Record 1 of 4." But as soon as I drag the mouse the slider goes from being a small slider (as if indicating many records) to a slider filling the entire area of the scrollbar, this is also when "Record 1 of 4" dissappears.

So it's like it knows the records are there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top