User Profile
Collapse
-
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 +! -
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]))
-
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.
...Leave a comment:
-
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... -
-
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....Leave a comment:
-
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 helpLeave a comment:
-
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...Leave a comment:
-
just done the step into and it went straight from the DoCmd Output To... to the error handler. No explanation why though!!Leave a comment:
-
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...Leave a comment:
-
at the top of the function I have:
Code:Function ExSnap1() On Error GoTo Macro1_Err
Code:Macro1_Err: MsgBox Error$ Resume Macro1_Exit End Function
Leave a comment:
-
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... -
thank you very much for your advice. i've got it working now. never would have done it without you!Leave a comment:
-
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...Leave a comment:
-
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... -
Thank you very much for your quick response! i'll give it a try now!Leave a comment:
-
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... -
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 :DLeave a comment:
-
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)
Leave a comment:
-
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.
Code:IIf(IsNull([SpecialNeedsStudents].Here, "", "exists in database")
Leave a comment:
No activity results to display
Show More
Leave a comment: