GessTechie
Technical User
Good Afternoon...
I want to update a table based upon a docmd.runsql command from a formm
The table has two text field, and two date fields, as well as a primary key.
The form runs great but when it attempts the docmd.runsql statement, it says 0 records to add.
Here is the code:
stUserLogUpdate = "INSERT INTO [User Log] ( [User ID], StartDateTime, EndDateTime, [Account Worked] )SELECT [User Log].[User ID], [User Log].StartDateTime, [User Log].EndDateTime, [User Log].[Account Worked] FROM [User Log]WHERE ((([User Log].[User ID]) = [Forms]![Credit Letter Dispute Starting Window]![Text11]) And (([User Log].StartDateTime) = [Forms]![Credit Letter Dispute Starting Window]![Text19]) And (([User Log].EndDateTime) = Now()) And (([User Log].[Account Worked]) = [Forms]![Collection Dept Credit Report Letter Disputes Resolution Form]![Customer Account Number]))"
DoCmd.RunSQL stUserLogUpdate
I've tried to create a macro to do it and a function but nothing seems to work.
Also, I dont want the user to have an option of the update. How can I get it to just do it without prompts?
I want to update a table based upon a docmd.runsql command from a formm
The table has two text field, and two date fields, as well as a primary key.
The form runs great but when it attempts the docmd.runsql statement, it says 0 records to add.
Here is the code:
stUserLogUpdate = "INSERT INTO [User Log] ( [User ID], StartDateTime, EndDateTime, [Account Worked] )SELECT [User Log].[User ID], [User Log].StartDateTime, [User Log].EndDateTime, [User Log].[Account Worked] FROM [User Log]WHERE ((([User Log].[User ID]) = [Forms]![Credit Letter Dispute Starting Window]![Text11]) And (([User Log].StartDateTime) = [Forms]![Credit Letter Dispute Starting Window]![Text19]) And (([User Log].EndDateTime) = Now()) And (([User Log].[Account Worked]) = [Forms]![Collection Dept Credit Report Letter Disputes Resolution Form]![Customer Account Number]))"
DoCmd.RunSQL stUserLogUpdate
I've tried to create a macro to do it and a function but nothing seems to work.
Also, I dont want the user to have an option of the update. How can I get it to just do it without prompts?