Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    May 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA newbie needs help...

    Hi everyone...

    I'm new to Woody's but from what I've read in the posts, it looks like everyone is happy to help one another and that is exactly what I need... [img]/w3timages/icons/smile.gif[/img]

    I need help from the experts... I have only been using Access for a month now and I have never written in VBA before and although I have searched and read every scrap of information I can find on it, I am still having problems understanding a few things... (I'm using Access '97...not the developer's edition)

    1) I have a project involving creating two different reports according to finding records that match different criteria... The first data that I receive through download has approx. 50,000 records... I have created queries to reduce it substantially but now I've gotten to the part where I believe code is required...

    2) I have one query (RequiredRecords) that is now only showing 280 records... I now have to check dates...
    "If the Business day following the RDate equals ExDate, then generate the reports..."
    Ok... I created a table with records for each Holiday (the actual day that we will be closed...)...because that's not going to be a business day... I know I have to extract the day part of the Date fields and say something like...
    CheckRDate = RDate + 1
    CheckRDay = DatePart("w", CheckRDate)
    Then I think I will need a loop... adding 1 to CheckRDate if it equals a weekend or holiday... I have written some spec.s to complete this task... (hopefully they are all right, but I can't test it unless I get it to run...)

    3) The part I can't figure out is the declarations ... I have looked at many examples but I can't quite get it to make sense and work for me... I need to use fields from the query "RequiredRecords", fields from the table "Holidays2001", and a couple of new ones... Any idea of the spec's for this?

    4) Also... I have only seen examples in the books I have looked at and online, showing code used in forms and reports etc (OnClick events?)... I don't really want a form to open... I don't want the reports generated unless there are records matching the entire criteria... Do I need to create a macro to run this code? ...Basically when I leave I want the people in the department to click one thing and it will either tell them that there are no records to put on the reports... or it will do the work and bring up the reports... Is this possible?

    5) What happens to the final records? ... ie. the ones where the NextBusDay (RDate + ?) does = ExDate... I will need all the corresponding fields for the record that matches (from RequiredRecords)

    I'm sorry this is so long... but I seem to be stuck... Every day I think I get a little closer... but I can't find the answers I need ... Any help would be greatly appreciated... I'm not as much of an idiot as I sound, I promise... [img]/w3timages/icons/laugh.gif[/img]

    Have a great day everyone!

  2. #2
    Lounger
    Join Date
    May 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA newbie needs help...

    Please ignore my post... I apologize... I asked too much all at once... I'll figure it out eventually... Thanks everyone...

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA newbie needs help...

    Try breaking your questions up into individual blocks and posting them in the Access forum. Even though VBA is part of all the Office applications, the implementation varies depending on the particular application, and Access varies more than most. A lot of us hang out in multiple forums, but your questions and answers will get more views if you post them to the application forum rather than here.
    Charlotte

  4. #4
    Lounger
    Join Date
    May 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA newbie needs help...

    Thanks Charlotte... That's a great idea... I actually found a good online tutorial for VBA... (from beginner to advanced)... It is helping quite a bit!...

    I forgot to mention in my first post, that I'm not new to programming and/or database work ...just to VB/VBA and Access... I just need some answers to help me adapt... A few "Ahhh...now I see it!!"(s) and I'll be fine... [img]/w3timages/icons/laugh.gif[/img]

    I'm sure I'll be back for ideas as I get going... but I'll try and make my posts more concise...

    Have a great evening!

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: VBA newbie needs help...

    Alexya,

    Which online tutorial are you using?
    There are probably others who would find the info useful...

    Thanks,
    Gary

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA newbie needs help...

    gary,

    I concur!

    It would be useful when we're trying to help people out in the lounge to be able to point them at something to teach the basics.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    Lounger
    Join Date
    May 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA newbie needs help...

    Okay... Here's the link...
    http://www.vbatutor.com/vbatutor.htm

    It starts off literally at the beginning... (for people who have absolutely no programming experience at all)... I quickly skimmed the first part, but it did answer some questions for me... There are 5 parts with a various amount of lessons in each...I have been using the online version... Also, there are exercises to download and try at the end of each lesson...

    Hopefully someone else will find it helpful too.. [img]/w3timages/icons/smile.gif[/img]
    Have a great day everyone!

  8. #8
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA newbie needs help...

    Alexya,

    Looks like a great site- thanks for the link.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  9. #9
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: VBA newbie needs help...

    Here's a link to free downloadable VBA tutorial materials from AppDev. This also looks like good stuff. (I recommend their non-free stuff too!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •