I have created a popup form (Access 2000) and it pops up if the text entered on the main form matches the Vehicle Vin # (text) in underlying table before the table is saved. (I don't want to prevent duplicates, just warn the data entry person that a duplicate exists and show details.) My problem is that the form pops up all the time - even if there isn't any matching text and it is blank. I'm using a macro (I know, I know I should be using VBA but this almost works.) In the main form, frmLoans, VehicleVin text field I have the macro in the "Before Update event" to have the popup form using this Where: statement--
[Forms]![frmLoans]![VehicleVin].[Text]=[qryValVinCurrent]![VehicleVin].
My macro condition is DCount("[LoanID]","qryValVinCurrent"
> 0 but the timing is off. I only want it to open IF there is at least one match. There are 330 records in the results of my query without the filter and if I set the greater than to >330 in the condition, the popup form
doesn't open which is making me believe I'm on the right track. I just can't get the condition to grab the result AFTER the WHERE statement. I've tried a dozen combinations of moving the conditions to the popup form, to the query, and back to the mainform, but either get errors or the form regardless of number of
records.
Thanks for helping a novice.
P.S. I can do a little VBA if that's what I need to do, but please know I'm learning mostly by reading, trying and retrying. I've learned alot from all of your posts!
Sharon
[Forms]![frmLoans]![VehicleVin].[Text]=[qryValVinCurrent]![VehicleVin].
My macro condition is DCount("[LoanID]","qryValVinCurrent"
doesn't open which is making me believe I'm on the right track. I just can't get the condition to grab the result AFTER the WHERE statement. I've tried a dozen combinations of moving the conditions to the popup form, to the query, and back to the mainform, but either get errors or the form regardless of number of
records.
Thanks for helping a novice.
P.S. I can do a little VBA if that's what I need to do, but please know I'm learning mostly by reading, trying and retrying. I've learned alot from all of your posts!
Sharon