Results 1 to 9 of 9
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    Access programming or VBA not always consistent

    Hello,

    Access programming/ VBA when working with files, power point, words, excel etc are not consistent.

    Sometimes it works just right, let’s say if I want to copy info from excel to word etc. other times it doesn’t work just right and I am not sure why.

    Please advise !

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    It does , but because they are different animals.
    A dog and cat both have 2 eyes, 4 legs, but when they speak they give a different noise.
    (close but not all the same)

    the objects,
    Excel has spreadsheets and workbooks,
    Access has recordsets,
    Word has pages,paragraphs.

    you must learn the different objects, and how each 'barks'. (or just press '.' to see the properties)
    The VB IS consistant in all the statements: IF/THEN, WHILE/WEND,...
    and all objects have properties.
    Some different than others.

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Ranman256,

    You misunderstood me.
    I meant that for example you created a program in Access that copy or place values from your table into workbook and you do this for like more than 100 workbook pages.

    You ran and reran the codes. It works perfectly but sometimes it doesn’t. Now why is it inconsistent that it works sometimes but not all the times.

    I am just using an example.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    What does "sometimes it doesn't" mean - error message, wrong results, nothing happens?

    Would need the code and example data to analyze.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    As June7 suggested, for something this complicated we really need to see your actual code...best by looking at your file...not a 'for example' explanation.

    As someone once said...'The devil is in the details!'

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Thank you June7 and everyone. When I have sometimes and if needed I will create the same issue and share and we can resolve it together.

    I don’t think is error, actually I wouldn’t know because I added Err Resume Next. But I still think is not error because when given the same situation but running it at different times, it works with the outcome we wanted then other times the result is just blank.

  7. #7
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    I don’t think is error, actually I wouldn’t know because I added Err Resume Next
    This is quite dangerous to do in many situations, and is possibly hiding the underlying problem in your code.

    If there is an error being caused occasionally by poor or incorrect data, you should be capturing that and dealing with it, rather than ignoring it.
    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. #8
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Thanks Minty, I will remove it next time I update. I think I may still have that same issue because we are running it again and again with the same data in the same situation, sometimes blanks other times not but will see.

  9. #9
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    But I do hope it gets resolve though with making that adjustment.

    CHEERS 🥂 👍👍

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Forecasting Consistent Hours
    By jrfost in forum Database Design
    Replies: 10
    Last Post: 02-22-2019, 04:35 PM
  2. Access not consistent
    By johnseito in forum Access
    Replies: 3
    Last Post: 08-11-2018, 05:51 AM
  3. Replies: 4
    Last Post: 05-29-2015, 09:36 AM
  4. Replies: 1
    Last Post: 12-24-2014, 03:49 PM
  5. Query Bug? Not returning consistent results
    By trb5016 in forum Queries
    Replies: 4
    Last Post: 06-15-2010, 12:00 PM

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