macro run incorectly

Gerhardc

New member
Local time
Today, 12:56
Joined
Aug 22, 2006
Messages
5
Hi there

I have a database where on a form 2 fields are compared to be the same ( done with relationship). I now want a macro ( or something else) that will open a form when the data in the 2 fields are not equal.
sample

table= stock recieve
field 1 = stock code ( recieved)
field2 = stock code(created)-------> This is optained from the stock code create table

when a stock code is entered in 1 and 2 does not have a matching entry in 2 the stock code create form should open.

Here is the macro i use:
line 1 is a openform where the "where condition" is [Forms]![Stock_Recieved]![ST_Code].[AfterUpdate]<>[Forms]![Stock_Recieved]![Stock_Code].[AfterUpdate]
line to is just a msg box that will tell you the code does not exists.

when this macro run it opens the form even if the code does exist.......

Please helppppppppppppp!!!!!!! ( i am sure its only something simple LOL)

thx
 

Users who are viewing this thread

Back
Top Bottom