Ok, Thanks to all ...
I used all of your advise and made this:
Dim a As String
Dim rs As New ADODB.Recordset
rs.Open "Select * FROM Inventory", CurrentProject.Connection, adOpenStatic, adLockReadOnly
rs.MoveFirst
Do Until rs.EOF
With rs
a = rs!ItemNumber
End With
DoCmd.RunSQL "INSERT INTO...
It's new things for me.
I have to use these lines in the query?? or in the vba??
I think to be used in vba but....
for example::
if recordset in vba is in record 4:
[item number]=27
[location]=3
so my query criteria in this time to be these values!!!
How query can get these...
Thanks lespaul, I think you are helping me very closed which I want to know.
Ok, If you have seen in my attached file, I have to run the queries for all the item numbers on the records one by one.
So it's good idea that I can use recordset But when recordset is changing the record, how...
Sorry, But still I'm confused that why here no one to help me to do it. and every one want to change my mind to change my method.....
I have some situation which I can't change it and I don't think this my request would be very difficult to make!!!
Anyway, If here no one want to help me, I...
Yes, Exactly what I needed.
Thanks a lot
Now, If I want to have an event to do it on the form which have record source to the same table like this:
1) open the form on the first record
2) docmd.openquery "sample"
3) go to the next record "up to the end of tables record"
4) if no...
Ok, If I want to write all my calculation here, would be high comfused.
Just renew my question please, and forget every thing.
Let me ask you only:
How to repeat the line : msgbox "hello"
in depend of table AAA record's quantity.
It means if the table AAA have 12 records, by the...
Ok, If I want to write all my calculation here, would be high comfused.
Just renew my question please, and forget every thing.
Let me ask you only:
How to repeat the line : msgbox "hello"
in depend of table AAA record's quantity.
It means if the table AAA have 12 records, by the...
Thanks, you are right I corrected lke this:
I think My question became complicated.
I make it simple:
table AAA: include 10 records with two fields "Item" and "location".
Form CCC: include 2 text box with record source of table AAA
Query BBB: INSERT INTO DDD ( Item, Location...
Thanks,
I think My question became complicated.
I make it simple:
table AAA: include 10 records with two fields "Item" and "location".
Form BBB: include 2 text box with record source of table AAA
Query BBB: SELECT AAA.Item, AAA.Location
FROM AAA
WHERE...
Yes, I do this on the form when I'm on the record of one of the item number and I can do recalculate by that item number just. I can't do this calculation in vb. Just I could make it in query.
because I need to repeat for all the item number with one click, I have to make command in vb...
Ok, But my recalculation is 7 query, That's why I attached the database.
But I don't think that you need the sql code, to reply me what I asked!!!!
Let me make simple my question:
If I want to have a VBA code to repeat the following sql only:
INSERT INTO [tempInventory items] (...
Thanks for your advise,
Yes you are right but in our database we need these tracking and also we have no problem in calculation of large records.
I attached the sample of job which I'm doing one by one in a form by one click on the footer. it's take time to change the record and click the...
ok Thanks for your replies,
Yes,
Table a: 1) item number 2) name 3) quantity in stock
Table B: 1) item number 2) Quantity In 3)quantity out
in some case which the quantity in stck shows wrong bacuase of any reason, user must recalculate it.
so I want by one click and command...
Hi,
I have a table include Item numbers and names ,...
and also another table which is Quantity in and Quantity Out and Quantity in Stock.
I have a Update query which will recalculate the quantity in stock for one item number which i put in criteria.
I have to run this update query one by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.