User Profile

Collapse

Profile Sidebar

Collapse
g diddy
g diddy
Last Activity: Jul 13 '20, 12:20 PM
Joined: Sep 10 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • g diddy
    replied to IIF Statements
    Thank you very much for the snippet and explanation topher23; I have got it working perfectly now! Also thank you NeoPa for that guide, it was very useful. I didn't realise that there was a difference between & and +!
    See more | Go to post

    Leave a comment:


  • g diddy
    started a topic IIF Statements

    IIF Statements

    Hi

    I'm using the following IIf statement to populate a field in a report.

    Code:
    =IIf([SubFormValues2]="",[SubFormValues],IIf([SubFormValues3]="",[SubFormValues]+""+[SubFormValues2],[SubFormValues]+""+[SubFormValues2]+""+[SubFormValues3]))
    SubFormValues1 (2 and 3) are all from the same query - (I have had to do it like this in the report as in...
    See more | Go to post

  • g diddy
    replied to Replacing existing files in a folder
    Thank you to everyone for all your help. I've taken everyone's advice and I have got it working now. It is also a lot more efficient as i've done away with the duplication. I also decided that as the 5 pdf files that are created have a specific temporary name each, that I would delete them from the folder with the kill statement (if they already existed) only if the new pdf(s) being moved had the same temporary name(s). Works a treat.
    ...
    See more | Go to post

    Leave a comment:


  • g diddy
    started a topic Replacing existing files in a folder

    Replacing existing files in a folder

    Hi there. I'm using the following code to move pdf and snp files into seperate locations after they have been used by another module. Purely for backup purposes. However if a user creates the same reports twice in one day for the same school the pdfs and snps are not placed into the folder as they already exist. As the users keep forgetting to delete the old versions the folder is starting to get a bit clogged! Please can you teach me how to replace...
    See more | Go to post

  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    Thanks NeoPa they are very useful!
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    Thanks very much for that correction missinglinq, the error message now no longer appears. For some reason though, when I step through the code it still gets to this line and then shows the message box saying that it is outputting to file but then the code stops and when I step through again it starts at the beginning of the code. There are no error messages and everything after this line is ignored, even msgbox, and also the file is not created....
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    thanks for all your help and advice guys. i'm off work til the 4th of jan but when I get back i'm going to try a few things and see how it goes; using everything you've said to guide me. I'll let you know how it goes. thanks for your help
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    yes it is a work machine, im not sure what the local policy with it is though so that may be the case, however i'm sure it used to work. How would I go about hard coding it to the desktop location? like say my personal drive was Y would I just simply need to change the C:\ to Y:\? As far as I know it isn't opened by another process. Later on in the code I convert from snp to pdf but as it doesn't seem to be outputting at all it isn't even getting...
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    just done the step into and it went straight from the DoCmd Output To... to the error handler. No explanation why though!!
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    that's another thing ChipR; it says the file has been created but it does not show up in the C drive. Also sometimes I get an error message saying that there is not enough free disk space to save it. I think this may be related in some way! However I cannot see why it isn't working - it used to work and the code for outputting it to a file is exactly the same. I'd hate to do it as the code is very long, but would pasting the entire code here be able...
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to code after "Docmd.OutputTo.." ignored?
    at the top of the function I have:

    Code:
    Function ExSnap1()
    On Error GoTo Macro1_Err
    and at the bottom I have:

    Code:
    Macro1_Err:
        MsgBox Error$
        Resume Macro1_Exit
    End Function
    apart from that there is no other error handling. PS Thanks for your quick response!!
    See more | Go to post

    Leave a comment:


  • g diddy
    started a topic code after "Docmd.OutputTo.." ignored?

    code after "Docmd.OutputTo.." ignored?

    Hi, I have used the Docmd.outputto function in various places in my code but for some reason all code that comes afterwards, even msgbox doesn't show. I was just wondering if there is anything that could be causing this. For example in the snippet below the docmd command brings up a box saying that it is outputting the file to c:\FullTimetabl e.snp but no msgbox appears saying "test". I have about 6 or so if statements with the same problem...
    See more | Go to post

  • g diddy
    replied to forms based on queries - change values?
    thank you very much for your advice. i've got it working now. never would have done it without you!
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to forms based on queries - change values?
    thanks for your quick reply mike! unfortunately the checkbox cannot be uniquely identified. i've thought about a number of possible solutions but i keep hitting brick walls. mainly because this subform depends entirely on the query - for each particular exam there are a certain number of invigilators so it would be ideal to have this checkbox appear just for them, but if i don't use the query the only other option appears to keep it as it was with...
    See more | Go to post

    Leave a comment:


  • g diddy
    started a topic forms based on queries - change values?

    forms based on queries - change values?

    Hi

    I have a form (Allocation_Sub _Form) which is based upon a query. This query draws information from a number of tables depending on what invigilators are invigilating particular exams. This form is then used as a subform on another form (Allocation_For m). One of the fields that is retrieved from the query is a check box however when the form is open it is not possible to change the value in this check box. Is there a way that a user...
    See more | Go to post

  • g diddy
    replied to Multiple Select in Access 2003
    Thank you very much for your quick response! i'll give it a try now!
    See more | Go to post

    Leave a comment:


  • g diddy
    started a topic Multiple Select in Access 2003

    Multiple Select in Access 2003

    Hi

    I'm using a statement to call other Subs if a unit (or multiple units) in a multi-select list box has been selected (and if not - do nothing). I know that the part below in Bold and Underlined is wrong but I cannot think of what it should be. I've tried a few variations of that part but still it doesn't work. By any chance can you help me with this? Basically i want this for loop to go through the list box (cmbUnit) and for every...
    See more | Go to post

  • g diddy
    replied to Query Expressions
    That makes perfect sense. Thank you ChipR, JennDub and NeoPa for all your help. I learnt a lot too. thank you for your time and effort :D
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to Query Expressions
    JennDub you legend thank you very much for spotting that.

    Here is the sql view code:
    Code:
    SELECT SpecialNeedsStudents.NAME, EXTTSTUDSPECNEED.STUDENTID, SpecialNeedsStudents.COURSE, EXTTSTUDUNIT.UNITCODE, SpecialNeedsStudents.NOTES, IIf(IsNull([SpecialNeedsStudents].[Here]),"","exists in database") AS Expr1
    FROM (SpecialNeedsStudents INNER JOIN EXTTSTUDUNIT ON SpecialNeedsStudents.STUDENTID = EXTTSTUDUNIT.STUDENTID)
    ...
    See more | Go to post

    Leave a comment:


  • g diddy
    replied to Query Expressions
    My apologies again! It won't let me view as sql view because I keep getting the error:
    Code:
    The expression you entered has a function containing the wrong number of arguments.
    The expression being:
    Code:
    IIf(IsNull([SpecialNeedsStudents].Here, "", "exists in database")
    The sql code I posted before is from the only other things in the query. I have a feeling i'm trying to do something that's not...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...