Solved

Problem with Update Error '3144'

Posted on 2008-10-10
2
448 Views
Last Modified: 2010-04-21
I Cannot find the correct syntax to fix the problem i'm having. i'm using a update query to change a variable.  The strFieldName is the field name A1 throught A80.
    Dim txtName As String
    Dim strFieldName As String
        txtName = Me.txtSelectedText1.ControlSource
        strFieldName = Mid(txtName, 4, 3)

        DoCmd.RunSQL "UPDATE VehicleEquip SET VehicleEquip.( " & strFieldName & " )  = False;"

the code works if there is a spacific field (eg."UPDATE VehicleEquip SET VehicleEquip.A41  = False;")
but i need it to work for all of them.

i'm aware that i can create a recordset and then loop through them, but this seemed easier, although now its not.....
thanks
~B~
0
Comment
Question by:DonGarry
2 Comments
 
LVL 7

Accepted Solution

by:
shambalad earned 500 total points
Comment Utility
try this:
 DoCmd.RunSQL "UPDATE VehicleEquip SET VehicleEquip." & strFieldName & "  = False;"
0
 

Author Closing Comment

by:DonGarry
Comment Utility
Thank you so much, i thought i tryed that one but apparently not!

thanks again!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ust html in ms/access WebBrowswer 11 40
MS Access crosstab query -- driving me nuts 5 18
Dcount unique 6 21
Resize text 4 13
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now