You cannot use a parameter field for the N value.
If you want to make the TopN flexible then you have to move it into code. You first need to create a 'dummy' query in the database window which can be used to hold the sql statement you create in code.
I have assumed that this query is called 'qryDummy' in the following code example. Obviously you need to change the sql statement to your own.
Run this code from a button click event.
Sub vartopn()
Dim db As Database
Dim qdf As DAO.QueryDef
Dim strsql, howmany
Set db = CurrentDb
Set qdf = db.QueryDefs("qryDummy")
howmany = InputBox("How many values to report?")
strsql = "SELECT TOP " & howmany & " Orders.OrderID, Orders.OrderDate, Orders.Freight"
strsql = strsql & " FROM Orders ORDER BY Orders.Freight DESC;"
qdf.SQL = strsql
DoCmd.OpenQuery ("qryDummy")
Set qdf = Nothing
Set db = Nothing
End Sub