command button wizard can't see fields (1 Viewer)

jmlight

Registered User.
Local time
Today, 02:41
Joined
Feb 6, 2009
Messages
54
I am trying to add a button to a Form that will open another form.

THe secondary form is already designed (Assistance Requested)

When I start the button wizard, I select :
Form Operations
Open Form (click next)
Select: Assistance Requested Form (Next)
Select: Open the Form and find specific data to display (Next)

The next page that appears asks me to select the linking fields. But, no fields are listed in the first column that is associated with the calling Form. That form uses a table named: Clients

Clients is linked to Assistance Requested through the client_id field

Why do you think that No fields appear on the left side of the selection?
 

jmlight

Registered User.
Local time
Today, 02:41
Joined
Feb 6, 2009
Messages
54
I tried using your code, but when I do, I get a box that appears stating "Enter Parameter Value" and then giving me a space to enter the client_id.
(BTW - both tables are linked through the client_id field)

Here's the code that's in the subroutine for the button:

Private Sub clientrequests_Click()
On Error GoTo Err_clientrequests_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Assistance Requested"
DoCmd.OpenForm "Assistance Requested", , , "Client_id = " & Me.Client_ID


Exit_clientrequests_Click:
Exit Sub

Err_clientrequests_Click:
MsgBox Err.Description
Resume Exit_clientrequests_Click

End Sub
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:41
Joined
Aug 30, 2003
Messages
36,140
What is its data type? That's the proper syntax for numeric. If that's not it, the parameter prompt indicates that the name is wrong in one or the other. Make sure it's in the data source of both.
 

jmlight

Registered User.
Local time
Today, 02:41
Joined
Feb 6, 2009
Messages
54
It is numeric in both tables.

I just know that it's something obvious I'm overlooking - I have one form that works perfectly, so I'm going through every property trying to figure out how they differ!

They both are linked with client_id - but one form does exactly what it should, the other doesn't.

Not sure why!!!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:41
Joined
Aug 30, 2003
Messages
36,140
The parameter prompt almost always means it can't find the named field in one of the forms. Can you post the db?
 

jmlight

Registered User.
Local time
Today, 02:41
Joined
Feb 6, 2009
Messages
54
I'm embarassed. After hours of fiddling around with this today - it was indeed the OBVIOUS problem. One table field was client_ID, the other was clientid without the underscore.

I am an idiot.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:41
Joined
Aug 30, 2003
Messages
36,140
If you're an idiot, then so am I and just about everybody else. We've all done that at some point. :eek:

Glad you found the problem.
 

jmlight

Registered User.
Local time
Today, 02:41
Joined
Feb 6, 2009
Messages
54
Thank you for not banning me from the boards! I'm sure I will have many more questions as I muddle through learning this program.
 

Users who are viewing this thread

Top Bottom