Error when opening Dialog Box form from Link (1 Viewer)

fedebrin

Registered User.
Local time
Today, 02:11
Joined
Sep 20, 2017
Messages
59
I have the following related tables with corresponding fields
Actions have multiple Initiatives: one to many relationship(1 to *)
  • ActionsTable
    • ActionTitle
    • ActionID(1)
    • ActionTotal
  • InitiativesTable
    • InitiativeDetail
    • InitiativeID
    • ActionID(*)
    • InitiativeTotal
I also created a forms for both of these tables(ActionsForm and InitiativesForm)

On the ActionsForm, I created an even so that when the ActionTotal field is clicked, the InitiativesForm opens up as dialog box filtered for the corresponding IntativeIDs that are related to the ActionID that is clicked. This is the event:

Code:
Private Sub ActionTotal_Click()

DoCmd.OpenForm "InitiativesForm", acFormDS, , "ActionID = '" & Nz(Me.ActionID, 0) & "'", acFormEdit, acDialog, Me.ActionID

End Sub

I have used this same code to open related forms in dialog box but I am now getting Run-time error '3464'

thanks!
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:11
Joined
Feb 19, 2002
Messages
43,293
If ActionID is numeric, remove the single quotes around it.
 

fedebrin

Registered User.
Local time
Today, 02:11
Joined
Sep 20, 2017
Messages
59
that fixed it!

thank you!!
 

Users who are viewing this thread

Top Bottom