Odd Parameter error

alanMAC

Board Regular
Joined
Feb 11, 2005
Messages
77
I have a Form that is based on a Query SkillsQry.

The query runs perfectly (no problems)
The Form opens AOK when opened from the database window.

When the form is opened from a button on another Forms it asks for a parameter value SkillsQry.Surname

I have checked the Forms and queries for any mispellings and/or double data entries but no luck.

If I just escape it will open the form no problem, but it is bugging me, normally I can find such a problem.

Any ideas?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Alan

What about the code behind the button?

Have you checked that?
 
Upvote 0
The code is below Norie, I cannot see any problem :eek: .
I usually creat a macro then convert to code.

Note I have the * in the form name as a reminder that it is a "keep hold of object" as I design my DB.

Private Sub OpenSkillsfrm_Click()
On Error GoTo Err_OpenSkillsfrm_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "* Add Skills Form"
DoCmd.OpenForm stDocName, , , "[DriverID]=[Forms]![* Drivers Entry Form]![DriverID]", , acNormal

Exit_OpenSkillsfrm_Click:
Exit Sub

Err_OpenSkillsfrm_Click:
MsgBox Err.Description
Resume Exit_OpenSkillsfrm_Click

End Sub

Thanks for looking at it.
 
Upvote 0

Forum statistics

Threads
1,221,867
Messages
6,162,523
Members
451,773
Latest member
ssmith04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top