Share via

subform doesn't update

Anonymous
2024-03-05T22:18:25+00:00

I have a tabbed unbound form and each tab has a form within it.

On of these forms has a subform based on a query that returns issued badges.

When I use the form outside the tabbed form and I issue a badge the subform query updates correctly.

When it is within the tabbed form it issues the badge correctly, runs the requery but does not update the subform.

It places a what appears to be the do not symbol on the most current record of the subform and will not refresh.

However, when I exit Access and relaunch the badges that I issued show up and everything else works.

Microsoft 365 and Office | Access | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-03-06T12:44:24+00:00

    here is the code in the form that is imbedded in the tabbed form. The tabbed form has no code attached to it. It is an unbound from with the tabbed control on it. I have embedded all other operational forms in these tabs. This code works perfectly IF the form is opened stand alone. But when I open it in the tabbed form this is when it starts its issues.

    CODE:

    Private Sub BADGE_RETURN_Click()

    Me.SFG_Badge_Return.Visible = True

    'Me.SFGVisitors.Visible = False

    End Sub

    Private Sub Form_AfterUpdate()

    Me.SFG_Badge_Return.Form.Requery

    End Sub

    Private Sub Form_Load()

    DoCmd.GoToRecord , , acNewRec

    End Sub

    Private Sub MakeItSo_Click()

    DoCmd.RunCommand acCmdSaveRecord

    DoCmd.GoToRecord , , acNewRec

    DoCmd.OpenQuery "SFG_BADGE_RETURN", acViewNormal, acReadOnly

    DoCmd.Close acQuery, "SFG_BADGE_RETURN", acSaveNo

    'DoCmd.RefreshRecord

    'Me.SFG_Badge_Return.Visible = True

    End Sub

    Private Sub PRNT_VB_Click()

    'Me.SFG_Badge_Return.Visible = False

    Me.SFGVisitors.Visible = True

    End Sub

    When I issue a badge it does not show in the subform. If I close the form and reopen the badge that I just issued will appear and when I try to issue another badge the subform blinks like it has run the requery but does not update to the badge I just issued and the form changes to display the first badge I issued with what appears to be a lock on that record.

    My primary form looks like this:

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2024-03-06T00:03:32+00:00

    This indicates there is some code behind the subform, that is not working when used as a subform. We would need to know exactly how the subform works and see the code being used to be able to help..

    Was this answer helpful?

    0 comments No comments