473,326 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Ms Access reverse data automatically??

12
Hi...
I have created MS Access database for stores management and every thing is okay, there is purchase table ,receive table ,transfer table and damage table .
each one contain two table, now my problem is in the purchase table
let's take a look please
Expand|Select|Wrap|Line Numbers
  1. first table 
  2. sno     inv_no     date     supplier
Expand|Select|Wrap|Line Numbers
  1. second table
  2. sno     code     details    qty    price    discount     tot
__________________
the first_table.sno is connected to the second_table.sno
one to many relationship
_______________________
and the database is connected to vb
I have created report ,and what is happening is..

Expand|Select|Wrap|Line Numbers
  1. first table 
  2. sno     inv_no     date        supplier
  3. 1         0000      13-12-16    bla bla bla
Expand|Select|Wrap|Line Numbers
  1. second table
  2. sno     code     details    qty    price    discount     tot
  3. 1        01        hammer    4       10        0          40
  4. 2        02        screw     1       10        0          10
  5. 3        03        bottle    2        5        0          10
now when I print report it will reverse automatically, like this...

Expand|Select|Wrap|Line Numbers
  1. sno     code     details    qty    price    discount     tot
  2. 3        03        bottle    2        5        0          10
  3. 2        02        screw     1       10        0          10
  4. 1        01        hammer    4       10        0          40
Please help me...
thank you in advance...
Dec 16 '13 #1
15 1602
Rabbit
12,516 Expert Mod 8TB
In the record source for the report, have it order by sno.
Dec 16 '13 #2
xzorxx
12
thank you for your reply ...
order by sno, did nothing.

Dec 17 '13 #3
Rabbit
12,516 Expert Mod 8TB
Can't see your image. It would help if you post your record source code.
Dec 17 '13 #4
xzorxx
12
This is for filling table as you know

Expand|Select|Wrap|Line Numbers
  1. Me.Pu_it_QueryTableAdapter.Fill(Me.DbDDDataSet.pu_it_Query)
And this is inside table adapter

Expand|Select|Wrap|Line Numbers
  1. SELECT Inv_no, Pu_date
  2.    , P_no_pu, P_name
  3.    , code, Item_details
  4.    , price, qty
  5.    , dic, Su_name
  6.    , Sup_noT, U_name
  7.    , Total, name
  8.    , [For], Grandtot
  9.    , totDes, Purchase_no
  10. FROM [pu_it Query]
  11. ORDER BY Purchase_no
__________________________
and please don't forget that I have other tables with the same manner :), and they are work fine
thank you for your patient..

I should mention that ,in purchase table which user should use, is from tables in ms access and the report from query in same database
...
Dec 17 '13 #5
zmbd
5,501 Expert Mod 4TB
Expand|Select|Wrap|Line Numbers
  1. ORDER BY Purchase_no
for the momement place the field [Purchase_no] so that is visible in the records. Compare the order of the [Purchase_no] values to what you want.
Dec 17 '13 #6
Rabbit
12,516 Expert Mod 8TB
I don't see this sno field that you referred to in your orignal post.
Dec 17 '13 #7
xzorxx
12
Sorry rabbit I just used easy name instead of Purchase_no..
thank you zmbd you mean putting the Purchase_no in the sub Table
then order it.... I want it to be ordered to the user table order
:( is that possible...
and again don't forget I got other tables and it's just work fine
Thank you ...
Dec 18 '13 #8
xzorxx
12
Deleted post useless
Dec 18 '13 #9
zmbd
5,501 Expert Mod 4TB
xzorxx :

None of the images you posted are available to myself and I suspect most of the experts here as we are normally at work PCs where IT policy will block image and file storage sites.
You were told about this by Rabbit in Post#4 and via the moderator's edit tag in your previous post.

The other thing, your post becomes worthless to others if the images in the third party site are ever deleted, the site goes down for any reason, or if they are also in the same boat where their IT dept blocks image and file storage sites.

Will you please, take the time to actually describe what you did?
Dec 18 '13 #10
xzorxx
12
Yeah sure, sorry about that
I fixed the database query to add serial no to the sub table then try to order it but nothing happened ..!!
then i was thinking about report expression could I reverse the data from it..?
that's it and sorry again
also you can delete the hole thing if it's not okay to your site sorry
Dec 18 '13 #11
zmbd
5,501 Expert Mod 4TB
I fixed the database query to add serial no to the sub table then try to order it but nothing happened ..!!
Post the actual SQL

then i was thinking about report expression could I reverse the data from it..?
As you have this in the VB section and not Access/VBA, I'm not sure how to direct you here... normally in the Access program you can alter sort orders in the details section by altering the group/sort/total property

also you can delete the hole thing if it's not okay to your site sorry
Still would like to have the details instead of the pictures, if you would? We can replace the pics with the details.
Dec 18 '13 #12
xzorxx
12
Sure replace it please...

This is the SQL
Expand|Select|Wrap|Line Numbers
  1. SELECT Purchase_T.Purchase_no, Purchase_T.Inv_no, Purchase_T.Pu_date, Purchase_T.P_no_pu, Projects_T.P_name, Purchaser_T.name, Purchase_T.Sup_noT, Suppliers_T.Su_name, Purchase_T.For, pu_it.pu_no, pu_it.code, Item_T.Item_details, Units_T.U_name, pu_it.qty, pu_it.price, pu_it.dic, [qty]*[price]-[dic] AS Total, Purchase_T.totDes, [Total]-[totDes] AS Grandtot
  2. FROM Units_T INNER JOIN (Suppliers_T INNER JOIN (Purchaser_T INNER JOIN ((Projects_T INNER JOIN Purchase_T ON Projects_T.P_no=Purchase_T.P_no_pu) INNER JOIN (Item_T INNER JOIN pu_it ON Item_T.Codeit=pu_it.code) ON Purchase_T.Purchase_no=pu_it.pu_no) ON Purchaser_T.Purchaser_no=Purchase_T.Purchaser_noT) ON Suppliers_T.Sup_no=Purchase_T.Sup_noT) ON Units_T.U_no=Item_T.U_no
  3. ORDER BY Purchase_T.Purchase_no;
Dec 18 '13 #13
Rabbit
12,516 Expert Mod 8TB
How come the most recent query is so different from the first query you posted in #5?
Dec 18 '13 #14
xzorxx
12
I am truly sorry mr.Rabbit the first SQL code from vb
second from ms access db..!!

good news is Just minute ago I have solve the problem I recreated the Purchase Query from 0 again ,and now it's work fine..!!

thank you very much
Dec 19 '13 #15
Rabbit
12,516 Expert Mod 8TB
Not sure what went wrong but I'm glad you got your problem fixed.
Dec 19 '13 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Monica Ferrero | last post by:
Hi! I'm not sure if this is the most adequate mySQL list for this post. If not, please indicat me which one I should use... I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the...
4
by: Lefteris | last post by:
Hi, I am trying to write a simple application in javascript that automatically fills the fields of a form in a page at another domain. I display the foreign domain page on a frame and have the...
2
by: Marcus | last post by:
(Appologies if this group isn't the best place for this post) Is it possible to use DAO 3.6 to access binary data (varbinary(max)) in Sql Server 2005? I have images and sound in a Sql 2005 DB...
1
by: remote | last post by:
when i try to access my data access page remotely with i can't get my data. Why this happens?
0
by: Dilruba | last post by:
I want retrieve data from Ms Access 2000 database by using ASP and data type memo and after that i want e-mail that data automatically
0
by: Dilruba | last post by:
I have tried to take Memo (Access 2000) data type in a Dim variable. After that i have send it via e-mail text. But it is not sending the vaule. Here is the code that i have used: <% Dim msgDb...
1
by: nithya jayaraman | last post by:
hi now i am using vb with MS Access ... but i have some information in excel wook sheet , so access that data and store to data grid then find out the average of the sheet 1 and sheet 2 and...
1
by: JFKJr | last post by:
Hi! I have exported an access table data into an excel file using the following code. However, the code exported all the data to the excel sheet starting from 'A' cell (first column). But I want to...
4
by: Cirene | last post by:
I know that there are several ways to access/query data. (Stored procs, direct SQL statements, etc...) Typically I write a simple Stored Procedure, then access it from my webform like this... ...
1
mb60
by: mb60 | last post by:
I have two columns in my access table -FIELD1 and FIELD2. Field1 has the names of some animals. If I enter a name BIRD in Field 1, automatically a prescribed number , for example '2' should be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.