Hello,
I have a form where a user can specify a file name and upload it. I want to prevent users from loading the same file more than one time, creating duplicate records.
I am trying to prevent this with a macro using the CONDITION field. When a user loads a file for the first time, after successfully loading the file, the file name and current time stamp is added to a table tracking the files that have been loaded. I want to add a statement in the condition field of the first step which says the following:
IF [Forms]![SelectFile]![DataFileName] NOT IN [Data File Load History Table]![File Name]
THEM True, ELSE False.
I've tried the following two statements:
[Forms]![SelectFile]![DataFileName] NOT IN [Data File Load History Table]![File Name]
[Forms]![SelectFile]![DataFileName] <> "Data File Load History Table.File Name"
The first statement returns the error "the object doesn't contain the automation object"
The second statement returns no error but does not perform the correct validation.
Can anyone help me? Thank you!
I have a form where a user can specify a file name and upload it. I want to prevent users from loading the same file more than one time, creating duplicate records.
I am trying to prevent this with a macro using the CONDITION field. When a user loads a file for the first time, after successfully loading the file, the file name and current time stamp is added to a table tracking the files that have been loaded. I want to add a statement in the condition field of the first step which says the following:
IF [Forms]![SelectFile]![DataFileName] NOT IN [Data File Load History Table]![File Name]
THEM True, ELSE False.
I've tried the following two statements:
[Forms]![SelectFile]![DataFileName] NOT IN [Data File Load History Table]![File Name]
[Forms]![SelectFile]![DataFileName] <> "Data File Load History Table.File Name"
The first statement returns the error "the object doesn't contain the automation object"
The second statement returns no error but does not perform the correct validation.
Can anyone help me? Thank you!