Re: Update all records in VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Alex:

1.) First, it would be easier and faster to do the update using an update
query rather than using VBA.
2.) That said, the challenge will be that what you need is a cross walk
table that takes old or prior values from the tblA and tblB and then maps
them to the new values you are importing; but it appears that you are wiping
them out with the import and overwrite. If that's not the case, (i.e.
there's still some unique ID that is consistant in tblA and tblB after the
update that is also contained in tblParts, then the update should be simple
using the query.

--
SA
ACG Soft
http://www.groupacg.com

"Alex" <Alex@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CE28B104-BE26-4AB4-9761-2474BCB45A28@xxxxxxxxxxxxxxxx
I have a form frmParts with record source tblParts. In frmParts, I'm using
the macro action setvalue to set the value of many fields in my form,
which
are then stored in tblParts. The setvalues expression is a dlookup looking
at
fields in other tables in my database, tblA and tblB, which I haven't been
able to successful relate with tblParts.

My question is: tblA and tblB are often updated through importing. I'm
doing the import and update tblA and tblB in VBA. Is there a way, in VBA
where, after I import a new tblA or tblB, that I can run through all the
records in my tblParts and update the fields that were originally
populated
using the macro action setvalue when the form/record was open? Thank you
very much.


.



Relevant Pages

  • Appending problem after splitting field
    ... I have 2 tables: tblA and tblB. ... When a form opens tblA fields, after splitting AModelNo, are appended to ... Dim rst As DAO.Recordset ...
    (microsoft.public.access.modulesdaovba)
  • Re: Trigger After Delete - I need a Trigger Before Delete
    ... I have a table tblB which has to be filled whenever in table tblA ... This view vwC is based on a key field used in tblA. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • RE: SQL question - compare 2 tables
    ... To find which entries are in tblA but not in tblB, ... > of the parts in tblB may be missing. ...
    (microsoft.public.access.queries)
  • Strange behavior on query - Help??
    ... I have tblA with unique PrimaryKeyX. ... Then tblB has many PrimaryKeyX matches, and for each there is a fieldY ...
    (microsoft.public.access.queries)