×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Asking for parameter values - why?

Asking for parameter values - why?

Asking for parameter values - why?

(OP)
I have set up a subform, which i am currently having problems with (another story!), that i thin kis casuing the database to ask for me to enter parameter values for the two fields in the subform - everytime i open the database main form.  Get my problem?  Basically - i open the database and it asks for these parameter values!  Why is this happening, what does it mean, and how do i get rid of it?

Thank you in advance

Matt Pearcey

RE: Asking for parameter values - why?

Is the message either something like
The Query requires at least 1 parameter. or similar?
This would be a problem of the form query fields not all being correct.

Do you recognise the parameter it's asking for?

Often it's easy to get the master/child link field names (in the subform properties) around the wrong way, or spelt slightly wrong.

Also could be caused by the fact that some subform events happen BEFORE the parent form events (eg Form_Open and Form_Load from memory) so if the subform needs things in the Form_Load from the main form they won't be there yet.

Ben
+61 403 395 052

RE: Asking for parameter values - why?

(OP)
Thanks Ben, buti  am still having problems.  let me give you some more info.  I have one main form, that holds infomration on banks.  I have anohter fomr set up called a comments form, that enables me to put commetns against each of these banks.  i have a button that opens this form, but everytim i click on it, it states: ' Compile error. Only comments must appearafter end sub, end function or end property.' it then points to the follwoing code :

Private Sub open_comments_form_Click()
On Error GoTo Err_open_comments_form_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Comments"
    
    stLinkCriteria = "[Bank Id]=" & Me![Bank Id]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_open_comments_form_Click:
    Exit Sub

Err_open_comments_form_Click:
    MsgBox Err.Description
    Resume Exit_open_comments_form_Click
    
End Sub

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Comments"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_open_comments_form_Click:
    Exit Sub

Err_open_comments_form_Click:
    MsgBox Err.Description
    Resume Exit_open_comments_form_Click
    
End Sub

It highlights dimstdoc name (above)

what do i do?  i have tried to reset it, but the same errors come up.

Help?

Thanks in advance

Matt

RE: Asking for parameter values - why?

Private Sub open_comments_form_Click()
On Error GoTo Err_open_comments_form_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Comments"
    stLinkCriteria = "[Bank Id]=" & Me![Bank Id]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_open_comments_form_Click:
    Exit Sub
Err_open_comments_form_Click:
    MsgBox Err.Description
    Resume Exit_open_comments_form_Click
End Sub


This I believe should be the whole function.
It appears you've pasted most of the function again under it, but without the function declaration line.
Try replacing all your code above with just this.

Ben
+61 403 395 052

RE: Asking for parameter values - why?

(OP)
It worked!!

One of my problems solved!  I think you were right as looking through it, it appeared as if was in there twice.

Many thanks Ben, and keep you eye out for all my other queries i post!

Thank

Matt

RE: Asking for parameter values - why?

(OP)
Ben - me again.  Ive been searching for this thread everywhere.  I have another parameter problem.  I have just made some changes to my database to include some more fields, and also to adjust some originals.  Howver, now, the main field is BankName (which i havent touched) is messing about.  Everytime i now enter the database it asks me to 'Enter Paramter value. Bank Name'  Is this because i have maybe delted the space between the Bank and Name?  

All the otehr data that i have changed field for, seams to be ok.  Its just this bankname field.

Help?

Thank you for your help already.

Matt Pearcey

RE: Asking for parameter values - why?


If you created a form, report, or query using names that have since been changed, you will need to change the names in the form, report or query. Otherwise, Access will have to ask you for a value whenever you open an object with old spelling because it doesn't know where to find that identifier.

Terry
http://members.home.net/tlbroadbent/index.htm

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close