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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buggy subform

Status
Not open for further replies.

AccessSQLUser

Programmer
Apr 23, 2001
101
US
I have a subform and I change the sourceobject of the subform based on a tabcontrol. There is definitely something buggy because sometimes my subform is not being updated. The actual sourceobject is being changed but many times the controls have nothing in them and then when I click around some tabs, they suddenly appear. I found that if I tell it again and again what the LinkChildFields and LinkMasterFields are, it will eventually show me the data. But sometimes I have to repeat it once, and sometimes 10 times. Did anyone come across this bug? Is there anything I could change in my code to remove the bug? Right now the code in the 'Change' event of the tabcontrol is this:
With Me!subFormName
Select Case Me!Views
Case 0
.LinkChildFields = "ID"
.LinkMasterFields = "ID"
.SourceObject = "subForm1"
Case 1
.LinkChildFields = "ID"
.LinkMasterFields = "ID"
.SourceObject = "subForm2"
...
End Select
End With
 
Try setting up me.subform[1].requery and me.subform[2], thus when the change happens the form will refresh. Or at the end of the case statement try this and see if it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top