I got a problem with the where condition of the cmd.openform !
See code below :
Option Compare Database
Option Explicit
Dim Plaats As String
Private Sub IndexNumber_Click()
Plaats = Me.IndexNumber
DoCmd.Close
DoCmd.OpenForm "ApplicationForm", acPreview, , "IndexNumber = Plaats"
End Sub
Explanation :
I have a form where a part (selection) of the database is shown. When I click on an indexnumber the "Application Form" of that particular indexnumber has to be opened.
Instead of opening this "Application Form" I got an inputbox where I have to fill in a value for the variable "Plaats" !!! After this I get the right "Application Form" on the screen !!!
But I don't wanna see the inputbox. The meaning is that Plaats gets the value of Me.IndexNumber. When I walk through the code it will !
Something is wrong with the last DoCmd-line. How do I define the where condition, so that the value of Plaats will be checked ?
See code below :
Option Compare Database
Option Explicit
Dim Plaats As String
Private Sub IndexNumber_Click()
Plaats = Me.IndexNumber
DoCmd.Close
DoCmd.OpenForm "ApplicationForm", acPreview, , "IndexNumber = Plaats"
End Sub
Explanation :
I have a form where a part (selection) of the database is shown. When I click on an indexnumber the "Application Form" of that particular indexnumber has to be opened.
Instead of opening this "Application Form" I got an inputbox where I have to fill in a value for the variable "Plaats" !!! After this I get the right "Application Form" on the screen !!!
But I don't wanna see the inputbox. The meaning is that Plaats gets the value of Me.IndexNumber. When I walk through the code it will !
Something is wrong with the last DoCmd-line. How do I define the where condition, so that the value of Plaats will be checked ?