Re: update table from form
- From: tina <tina@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 14 Nov 2008 06:14:00 -0800
Hi
all my fields are text / strings and am trying to get form to update table
as when get it to run query only updating first record.
query sql is
UPDATE dbo_DataLots SET dbo_DataLots.StatusFlag = " "
WHERE (((dbo_DataLots.LotNumber)=[forms]![serial]![LotNumber]));
command in form is
Private Sub update_Click()
On Error GoTo Err_update_Click
Dim stDocName As String
stDocName = "SERIAL UPDATE"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_update_Click:
Exit Sub
Err_update_Click:
MsgBox Err.Description
Resume Exit_update_Click
End Sub
AS this was only updating selected record i tried to run using
strSQL = "UPDATE dbo_DataLots " & _
"SET StatusFlag = ' ' & " _
"WHERE [LotNumber] = '" & Replace(Me.LotNumber, "'", "''") & "'"
as suggested this only updates selected record aswell how can I updat eall
records shown in form
Thanks
Tina
She posted another message yesterday, in which I gave her the syntax to.
update a field based on a Like statement in here WHERE clause. But it didn't
occur to me until this morning that Access will not allow you to store a
space in a text field. It will allow leading spaces, followed by text, but
it will not allow a single space, or trailing spaces (it is as if it uses
RTRIM to trim all trailing spaces before it saves a text field).
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
"Stefan Hoffmann" wrote:
hi Dale,
Dale Fye wrote:
What is the DataType of your StatusFlag field? Is it text (if so, how manyThis shouldn't raise a syntax error.
characters)? After trying to answer your previous question, I realized that
if the field is a text field, Access will not let you actually store blanks,
so you are going to have to use some other character in that field.
mfG
--> stefan <--
- Follow-Ups:
- Re: update table from form
- From: Dale Fye
- Re: update table from form
- References:
- update table from form
- From: tina
- RE: update table from form
- From: Dale Fye
- Re: update table from form
- From: Stefan Hoffmann
- Re: update table from form
- From: Dale Fye
- update table from form
- Prev by Date: Re: suppress SHIFT key
- Next by Date: RE: How to Display in Forms- Join Table Query ?
- Previous by thread: Re: update table from form
- Next by thread: Re: update table from form
- Index(es):
Relevant Pages
|