Strange issue with open form

Soma_rich

Registered User.
Local time
Today, 15:42
Joined
May 2, 2007
Messages
58
I have done this hundreds of times before but this bit of code just will not work, I am sure its a simple problem but i cant see it. Please help! I am getting a value prompt box when I click OpenQuerys.

Private Sub OpenQuerys_Click()



Dim v_MONTH As String
Dim stLinkCriteria As String
Dim stDocName As String
v_MONTH = Forms![Months].MonthsCombo


stLinkCriteria = "month = & v_MONTH"
stDocName = "MonthResults"
DoCmd.OpenForm stDocName, , , stLinkCriteria


End Sub
 
Hi,

Try this,

stLinkCriteria = "month = '" & v_MONTH & "'"
 
UncleJoe you hit the nail on the head I knew it was something like that but I couldnt quite get teh syntax right. THANK YOU :)
 

Users who are viewing this thread

Back
Top Bottom