Simple VBA question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am creating a database that will import data from one db to another, at
the minute i am stuck trying to write some VBA to update my table from the
other one. I know is probably really simple but could you help me out with
the code for this. The psuedo code is shown below:

If [Tbl_Testing Import]![Some Value] = "Y" Then

[Tbl_New Table]![wbs_lvl_id] = 0

End If

......


For all i in Array

set x = wbs_id

for all j in [Tbl_Testing Import]

if [Tbl_Testing Import]![Parentid] = x Then

lvl = calc
End If
next i

next j

I hope u get the point. My problem is i dont' know how to communicate with
the original table to look at value or how to write to the new tables.

I wuold really appreciate some help on this as i think it would be really
simple i am just nto good using VBA with access.

Cheers

danny
 
Daniel said:
Hi

I am creating a database that will import data from one db to another, at
the minute i am stuck trying to write some VBA to update my table from the
other one. I know is probably really simple but could you help me out with
the code for this. The psuedo code is shown below:

If [Tbl_Testing Import]![Some Value] = "Y" Then

[Tbl_New Table]![wbs_lvl_id] = 0

End If

.....


For all i in Array

set x = wbs_id

for all j in [Tbl_Testing Import]

if [Tbl_Testing Import]![Parentid] = x Then

lvl = calc
End If
next i

next j

I hope u get the point. My problem is i dont' know how to communicate with
the original table to look at value or how to write to the new tables.

I wuold really appreciate some help on this as i think it would be really
simple i am just nto good using VBA with access.

Cheers

danny

Access allows you to create a link to a table in another Access
database. After creating the link you can run an update query on the
linked table. The table in the original database will be changed. If
you delete the link you will not be deleting the original table. When
backing up databases make sure you are backing up the original tables
rather than links to the original tables.

I hope this helps,

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top