copy paste issue with VB

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

Guest

Hi, I'm new in VB and I'm trying to achieve a copy and paste work

2 questions:
1) there is a function for VB that copies the values od a column and paste
them on another column?

2)Let me explain what I want to do:
I have a table1 with id (autonumber),product code (number), product
desc(text), stock(number) and order(number) columns, with this columns I
crated a query and I added the column total:([stock]-[order]), also I add an
iff column, that shows 1 if the order is different than 0 and else 2.
What I want to do is: when a macro is run, make an if structure, (if number
in iff column is 1 then….) the number in the total column of the query is
copied, pasted in the stock column, and then erase the order cell.

Almost all the VB part I know how to do it (and in excel I know exactly how
to do it) what I don’t know is how to call a specific cell in acces using VB
(something like excels activesheet.cells(1,1) function)

Also I want your opinion if a sendkeys function should be used in my program
structure.

I wait your answer

Tks.
 
You don't reference "specific cells in Access using VB".

Access is a database. It's composed of Tables, with each table have fields.
While it may look like Excel, it's extremely different.

You should be using a query to update the field, with a Where clause
specifying which row is impacted.
 

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