code to insert to a table

mana

Registered User.
Local time
Today, 06:51
Joined
Nov 4, 2014
Messages
265
hello

i have the following code but i have compile error in it also it need the b.projectname from me and i should insert the name of the project but i told that it should be equal to text0.value

can you help me please?
thank you

DoCmd.RunSQL ("insert into checks_projects([Creation date]) select a.[Creation date] from (select [Creation date] from CheckPoints) as a left join checks_projects b on a.[Creation date]=b.[Creation date] where a.[Creation date]< Replace(Format(Me.Text5, "mm/dd/YYYY"), ".", "/") and b.projectname= '" & Me.Text0.Value & "' and IsNull(b.[Creation date]);")
 
DoCmd.RunSQL ("insert into checks_projects([Creation date]) select a.[Creation date] from (select [Creation date] from CheckPoints) as a left join checks_projects b on a.[Creation date]=b.[Creation date] where a.[Creation date]< #" & Format(CDate(Replace(Me.Text5, ".", "/")),"mm/dd/yyyy") & "# and b.projectname= '" & Me.Text0.Value & "' and IsNull(b.[Creation date]);")
 

Users who are viewing this thread

Back
Top Bottom