simple Macro question

  • Thread starter Thread starter Jan Schmidt
  • Start date Start date
J

Jan Schmidt

Hi NG,

I'm useing MSAccessXP on WinXP.
I want to edit a DBase .dbf File.
Now i want to have a macro setting a column xxx to a specific value yyy in each
datarow.
So, i give you a small pseudo code, maybe, you understand my probelem better.

set xxx=Question(which column do you want to edit)
set yyy=Question(which value do you want to set)
do from 0 until nomore datarow
set datarow->column(XXX) = YYY
end do


how to do that?
how to write that kind of macro?
Please help me!

Thanks for any help

Jan
 
Hi NG,

I'm useing MSAccessXP on WinXP.
I want to edit a DBase .dbf File.
Now i want to have a macro setting a column xxx to a specific value yyy in each
datarow.
So, i give you a small pseudo code, maybe, you understand my probelem better.

set xxx=Question(which column do you want to edit)
set yyy=Question(which value do you want to set)
do from 0 until nomore datarow
set datarow->column(XXX) = YYY
end do


how to do that?
how to write that kind of macro?

A Macro is not the correct tool. An Update Query will do this,
however.

Use File... Get External Data... Link to connect to the .dbf file.
Let's say you name this table MyTable.

Create a Query based on MyTable. Change it to an Update Query using
the Query menu option, or the query-type icon. On the Update To line
under field ("column" is not a term usually used in Access) you want
to edit, type the value that you want to insert into the field.
Optionally, you can put criteria on the Criteria line to limit the
update to a selected set of rows.

Run the query by clicking the ! icon.


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
John Vinson" said:
A Macro is not the correct tool. An Update Query will do this,
however.

Ah ok i see, ok Macro is the wrong way, because it's so easy ... :-)

thank you a lot!!

regards Jan
 
Back
Top