J
John Ortt
I have a standard form which has all the fields in my Data Table.
I have left the Control source blank, so that I can assign the source when I
open the form (and change the filter depending on this also).
I have created two buttons on a form. I would like the first button to use
all the data where the subject has a "Big" value of greater than the value
input by the user. On the second button I would just like all results
returned. I have included the code I am using for the form below.The second
button works, but the first does not.
If anybody can help I would be very grateful.
John
Option Compare Database
Option Explicit
Dim stDocName As String
Dim stLinkCriteria As String
Function Open_Form()
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Function
Private Sub Button1_Click()
stDocName = "HowBigForm"
stLinkCriteria = "[Big]>" & [Enter Percentage]
Open_Form
End Sub
Private Sub Button2_Click()
stDocName = "HowBigForm"
Open_Form
End Sub
I have left the Control source blank, so that I can assign the source when I
open the form (and change the filter depending on this also).
I have created two buttons on a form. I would like the first button to use
all the data where the subject has a "Big" value of greater than the value
input by the user. On the second button I would just like all results
returned. I have included the code I am using for the form below.The second
button works, but the first does not.
If anybody can help I would be very grateful.
John
Option Compare Database
Option Explicit
Dim stDocName As String
Dim stLinkCriteria As String
Function Open_Form()
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Function
Private Sub Button1_Click()
stDocName = "HowBigForm"
stLinkCriteria = "[Big]>" & [Enter Percentage]
Open_Form
End Sub
Private Sub Button2_Click()
stDocName = "HowBigForm"
Open_Form
End Sub