ethan.geerdes
Registered User.
- Local time
- Today, 10:07
- Joined
- Jun 4, 2015
- Messages
- 116
There are string literals and string variables. When forming a string out of strings where one stops and the other starts they are joined (concatenated) with the ampersand & (sometimes +)
strSQL = "Update Fleet_Advisory_Messages" & _
" Set Status = 'Assigned' , " & _
" [Date Assigned] = #" & Date & "# ," & _
" [Assigned To] = '" & Me.Combo10 & "'" & _
" Where [FAM Number] = '" & Me.Combo14 & "';"
There's plenty of information on this to read if you just google "MS Access concatenation" Lot of videos too.
Thank you. I get it now. it's because it's a string made of strings.
So I took this information and added it to another form for completion but it clears the date assigned. I know databases only do what we tell them to do so I changed the code a little bit.
Code:
strSQL = "Update Fleet_Advisory_Messages" & _
" Set Status = 'Complete' , " & _
" [Date Complete] = #" & Date & "# ," & _
" Where [FAM Number] = '" & Me.Combo0 & "';"
So, why would it be clearing out the date assigned? is it because it's named strSQL like the other one and therefore "overwriting" the record?