Page 1 of 4 1234 LastLast
Results 1 to 15 of 51
  1. #1
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31

    MS Access 2016, Same Fields But Values are different?

    I am trying to make a small database in MS Access for a Gas Station, where I need to store data for every Single Fuel Dispenser's Current and Previous Readings. Which will then subtract Previous Reading from Current Reading and Calculate the Sales on a Given Rate. There are 4 Fuel Dispensers Installed on the Gas Station and every dispenser has 2 nozzles. I have Created 1 table for each Nozzle. Now I have a total of 8 tables with these fields (ID, Date, Rate, Current Reading, Previous Reading, Total Sale, Credit Sale, Cash Sale, Total Amount, Discount and Description (Images are Attached for Reference)).

    I also want to make Forms so that the User can enter the data from the Forms for each Nozzle. Can someone please help me with this? I have been trying it for the last four days and I am still stuck and cannot go further.

    NOTE: For each nozzle the readings will be Different.

    Click image for larger version. 

Name:	Tables.PNG 
Views:	11 
Size:	4.7 KB 
ID:	28191
    Click image for larger version. 

Name:	Table Design.PNG 
Views:	12 
Size:	16.6 KB 
ID:	28192

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    This seems to be set up as a spreadsheet rather than a database


    Sent from my iPhone using Tapatalk

  3. #3
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Quote Originally Posted by andy49 View Post
    This seems to be set up as a spreadsheet rather than a database
    Exactly brother this is more like a spreadsheet rather than a database. Bro is there a way to make this like a Database.

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Table1 readings


    Table2 pumps

    Might be a start


    Sent from my iPhone using Tapatalk

  5. #5
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Quote Originally Posted by andy49 View Post
    Table1 readings


    Table2 pumps

    Might be a start
    I will give it a try and then let you know about it. Thanks for your Suggestion andy49.

  6. #6
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    I have now Created two Tables, 1 for Pumps and the Second for Readings (images attached). Now should I link these two tables and proceed with the Queries, Forms and Reports?

    Click image for larger version. 

Name:	Tables.PNG 
Views:	10 
Size:	2.3 KB 
ID:	28193
    Click image for larger version. 

Name:	Pump Table.PNG 
Views:	10 
Size:	6.7 KB 
ID:	28194
    Click image for larger version. 

Name:	Readings.PNG 
Views:	10 
Size:	24.4 KB 
ID:	28195

  7. #7
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    You're database won't be normalised. I was thinking more of

    tblreadings
    ReadingID
    PumpID
    Readingdate
    PumpRate



    Sent from my iPhone using Tapatalk

  8. #8
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Quote Originally Posted by andy49 View Post
    You're database won't be normalised. I was thinking more of

    tblreadings
    ReadingID
    PumpID
    Readingdate
    PumpRate
    Oh I see, brother Andy, can you help me with these two tables please. I mean what fields I should have in Pumps Table and what fields in Readings Table. And a little guidance with the Relationships of tables as well. As you can see what I need. A little help from an expert like will be highly appreciable. Thanks.

  9. #9
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    You don't need to record before and end readings as they'd be the same. Just the reading at a particular date/time for each pump.

    Calculate things such as used totalsale can be calculated from the data which is stored. Not sure about cash/credit sales etc. Need more info


    Sent from my iPhone using Tapatalk

  10. #10
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Pm sent


    Sent from my iPhone using Tapatalk

  11. #11
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Quote Originally Posted by andy49 View Post
    You don't need to record before and end readings as they'd be the same. Just the reading at a particular date/time for each pump.

    Calculate things such as used totalsale can be calculated from the data which is stored. Not sure about cash/credit sales etc. Need more info
    Sure Brother, here are the Details:
    1. The readings will be taken from the Pumps on Particular time. (for example 2 or more readings can be taken on the same date as the Rate changes frequently)
    2. Current Readings – Previous Readings = Total Sale
    3. Credit sale = Total sale – Number of Liters sold on Credit
    4. Cash Sale = Total Sale – Credit Sale.
    5. Total Amount = Cash Sale * Rate

  12. #12
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    How would the "number of litres sold on credit" be arrived at. In very simple language. Leave out the work related terms.


    Sent from my iPhone using Tapatalk

  13. #13
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Let me elaborate further bro. Suppose we have 2 Fuel Types we are selling. Diesel and Petrol. We have some regular customers who take fuel on Credit, means they pay us later. That's what Credit sale is.

  14. #14
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Ok would you like to record that on the database and if so in what detail?


    Sent from my iPhone using Tapatalk

  15. #15
    dtoxic's Avatar
    dtoxic is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    31
    Yes Brother, I want to record the credit sale on the DB as well.

    Let me explain it with an example. Suppose this is our Yesterday's reading 123450, the Unit rate was $ 50.00
    Now Today's rate is $52.00 and the Reading is 123555.
    Yesterday's Reading = 123450 and the Rate was $50.00
    Today's Reading = 123555 and the rate is $52.00

    123555-123450 = 105 Liters. A regular customer took 5 Liters. 105 - 5 = 100

    5 Liters on Credit. and 100 Liters on Cash.

    100 Liters * Rate i.e. $52.00 = $5200.00

    I hope this example will help you now that What I need for my DB. Thanks Bro

Page 1 of 4 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-02-2016, 11:41 AM
  2. Replies: 4
    Last Post: 03-01-2016, 12:04 PM
  3. Replies: 3
    Last Post: 11-08-2012, 10:38 AM
  4. Access: Updating Null Fields with values
    By bmaz in forum Queries
    Replies: 2
    Last Post: 10-11-2011, 05:18 PM
  5. Replies: 7
    Last Post: 11-13-2010, 08:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums