Page 3 of 3 FirstFirst 123
Results 31 to 44 of 44
  1. #31
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi Minty

    The OP is saying that the CountofOffers is wrong. What he actually needs is a Count of specific Dates within the Previous Week.



    So for the 8thDec he needs 3 and not 7
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  2. #32
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    I'm a glutton for punishment - here are the two totals.
    Your coding needs to be more structured and logical. You method for validating data entry is very clunky, but we can have already covered that, so I'm not going to revisit it.

    I have removed a load of redundant code (not all of it by any way!), and indented it properly.
    Mike is right, you check, there are two offers noted on 30th December while the sub form shows 5 offers.
    Attached Files Attached Files

  3. #33
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Ah that wasn't clear.
    A sub query or second query fixes that.
    Attached Files Attached Files
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #34
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi Minty

    Well I just knew there would be an ideal way to resolve this and your latest solution fixes everything.
    I learn something everyday.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #35
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    Ah that wasn't clear.
    A sub query or second query fixes that.
    Thanks minty now it is working properly but now it is giving wrong total meter you can try changing the meter in the previous record.
    I would also like to know why the offermeter query that you have used in the dashboardcount query is not showing up in the dashboardcount query.
    Thank you.
    Attached Thumbnails Attached Thumbnails mintyUntitled.png  

  6. #36
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    Ah that wasn't clear.
    A sub query or second query fixes that.
    I have removed sum in total meter field from dashboardcount query now it is working properly now please just tell me why offer meter query is not showing in dashboard query thanks

  7. #37
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Well - as a guide to helping you develop have a look at the qryOfferMeters.
    Make a copy of it an play around with it, until you get the numbers you expect, or can explain why it's wrong.

    Sorry, but I'm rather busy with trying to fathom out why a building contract quotation is £0.06p out between two reports.
    Out of a total of >£1,250,00.00 which is obviously a rounding error somewhere, but proving a little difficult to pin down...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #38
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    Well - as a guide to helping you develop have a look at the qryOfferMeters.
    Make a copy of it an play around with it, until you get the numbers you expect, or can explain why it's wrong.
    Thanks now I understand everything.
    Now if you just help me a little more, it will be very kind of you. With the help of Mike, I tried applying this code in various ways in the meter text box of greyshade sub form to auto update this offerdate sub form, still the meters in the offerdate sub form are not getting auto updated properly. Actual results are not available until the main form is closed and reopened.

    Private Sub METER_AfterUpdate()
    [Forms]![Offer_Entery]![frmGREYOFFERDates].Requery
    End Sub

    I have tried applying this code in every way like after update, on enter, on got focus, please help in suggesting a way.
    Thank you.

  9. #39
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi

    The following is a Forms Reference:

    Code:
    [Forms]![Offer_Entery]![frmGREYOFFERDates].Requery
    So the code is making aReference to the Parent Form - [Offer_Entery]

    Then the subform named [frmGreyOfferdate]

    You just need to remove [frmGreyOfferDate] as this was the Subform that I added and
    replace with Minty's final working example.

    Rename the Form reference Code as well
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  10. #40
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    now i got success

    Private Sub Form_AfterUpdate()
    [Forms]![Offer_Entery]![frmGREYOFFERDates].Requery
    end sub

  11. #41
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    thank you very much to all..........

  12. #42
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Too slow - already fixed!
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  13. #43
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Minty View Post
    Too slow - already fixed!
    Please i dont't understand what you mean...

  14. #44
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I asked what you had attempted, but by the time I posted it, you had already answered your question.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Coding help!!!!
    By deepaksharma in forum Access
    Replies: 44
    Last Post: 12-03-2023, 05:54 AM
  2. Need Hlp VBA coding
    By yianni in forum Access
    Replies: 15
    Last Post: 10-14-2017, 09:25 AM
  3. pls hlp me fix this bad coding
    By harrie in forum Programming
    Replies: 1
    Last Post: 12-07-2016, 11:23 AM
  4. Need help in VBA coding
    By Kcgp in forum Programming
    Replies: 6
    Last Post: 02-01-2012, 11:22 PM
  5. Bar-Coding
    By texasprincess7 in forum Access
    Replies: 1
    Last Post: 02-12-2009, 10:29 AM

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