+ Reply to Thread
Results 1 to 11 of 11

Database crashing and coding errors

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Database crashing and coding errors

    Hi All,

    I used a template to creat a rota to allocate staff to vans, the database crashes when I try to generate a 7 day week, it says Error Overflow... but the employee is as long integer!?

    Also I need to ask access to look at the void date table and tell me if that person is off on that day and so ignore them.

    Any one out there able to help???
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Database crashing and coding errors

    What values should we enter to replicate the problem?

    In this part of the code vCount never changes, so the loop is endless because vCount<=2 will always be true.
    Please Login or Register  to view this content.
    Actually, you appear to be repeating that loop quite a few times in the code and each time you set vCount equal to 1 before the loop starts.
    Last edited by Norie; 10-29-2013 at 10:52 AM.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Database crashing and coding errors

    well, I've been starting on 04/11/2013 and finishing on 10/11/2013 and using employee number 1.

    Thanks!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Database crashing and coding errors

    See my edit.

  5. #5
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Database crashing and coding errors

    so shall I take vCount out? that was part of the template so I just left it

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Database crashing and coding errors

    To be honest I don't know what those loops or vCount are for, vCount doesn't appear to be used anywhere else in the code.

    Actually I really can't work out what's happening in the code.

    For example you have a nested if where every If statement has the same condition.
    Please Login or Register  to view this content.
    Where did you get the template from?

    Did you make any of the changes that are suggested in the comments?

  7. #7
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Database crashing and coding errors

    I got it from here:
    http://bytes.com/topic/access/answer...edule-can-done
    (I hope its ok to link!)

    Basically I have 10 vans, 2 employees need to be on each van for each day, I copied his coding and tried to make it work, as everytime I changed a bit I had another error pop up and so fixed each individual error as it came. Now its a mess

    I'm no good with coding, I can play with queries all day but I needed something fast and its just not turning out to be very fast, if anything just stressful! :P

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Database crashing and coding errors

    Looks like the database in that link has been created for one person's specific needs rather than as a template.

    What is it you actually want to do schedule wise?

  9. #9
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Database crashing and coding errors

    well there are 10 vans out every day, 2 people need to be on each van. I need somewhere to type their off days and AL and then it work out that they shouldn't be on the rota. Each person needs to be with a different partner each day of the week, so it needs to be pretty random but not repeat in the same week. I don't know if I'm making sense. Its currently done manually which takes forever! This was the closest I could get to what I needed so I thought I could adapt it with my skills but obviously I'm more dumb than I thought I was as that code just obliterated my brain

  10. #10
    Registered User
    Join Date
    07-17-2013
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Database crashing and coding errors

    Did you come up with any idea of what I could do? I still can't work out how to get this to work..

    Thanks

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Database crashing and coding errors

    Sorry for not getting back to you.

    To be honest I couldn't figure out anything in Access, is this sort of thing perhaps more suited to Excel?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Worksheet keeps crashing - is it coding issue or too many preparation formulae
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-16-2013, 03:55 AM
  2. First time coding in VB, no errors but my very simple script isn't working. Help?
    By metajellyfish in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-17-2012, 05:01 PM
  3. Database Errors
    By Domski in forum The Water Cooler
    Replies: 291
    Last Post: 10-01-2011, 02:47 AM
  4. Suppress database errors
    By greenfalcon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2005, 07:08 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1