Hi, I've been having problems getting my forms to work correctly. If
seen other threads addressing this issue, however, these are not
working for me. The short of my problem is this. I am trying to open a
new form and initialize it with a db query based on the info in the
current form. This wasn't a problem until I changed the table's
primary key to an Autonumber. tblLockCore.lockId is the autonumber at
the source of the problem...
strQuery = "WorkstationID = '" & Workstation.Text & "' AND
tblLockCore.lockid = '" ....
[for loop that finds and appends *only one* value]
strQuery = strQuery & "'"
DoCmd.OpenForm "frmLockCore", , , strQuery
With the code above, I get the 'openform action cancelled' error. Keep
in mind there is no "Cancel = True" statement related to this code, nor
is there even a cancel button.
If I replace
tblLockCore.lockid = '...' with
tblLockCore.lockid - '...', the wrong record is used to initialize the
new form. Coincidentally it is always the first record that would be
found if the second clause was removed.
tblLockCore.lockid - ... (no quotes) *same as above*
tblLockCore.lockid = ... (no quotes) *same as above*
I believe that I have addressed the issues that I have seen work for
other people but apparently this is not good enough for my program. Any
ideas? Thanks in advance!
ps. a couple of links i had reviously read....
http://groups-beta.google.com/group/...bf46cd29f992ce
http://groups-beta.google.com/group/...730c533bc5ce63