datetime - Access - Strange Error with Date Function -


this strange bug , feel i'm missing easy.

when use standard access date function on 1 form works without issue (see 'functions properly'). when use on form (see 'code causing error') debug error 'database can't find field 'date' referred in expression.'

hoping else sees stupid/obvious mistake...

functions properly:

with rs     .addnew     if chksubassembly = true         .fields("document") = mysubassembly         .fields("type") = "s"     else         .fields("document") = "m" & cmbcustomer & "-" & txtcustpn         .fields("type") = "d"     end if     .fields("description") = txtdmrdesc     .fields("author") = forms("frmuser").lbluser.caption     .fields("creationdate") = date     .fields("revision") = "draft"     .fields("pe") = cmbpe.column(1)     .fields("lasteditby") = forms("frmuser").lbluser.caption     .update end 

code causing error:

with rs     .addnew     .fields("validnum") = myprotocol     .fields("description") = txtnewdescription     .fields("author") = forms("frmuser").lbluser.caption     .fields("createdon") = date     .fields("lasteditby") = forms("frmuser").lbluser.caption     .update end 


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -