But isn't OldValue null, so why doesn't it like it (in your IF statement)?
Don't understand?That was because I'd copied it from the DeleteRow button... so should that be changed to null too?
But isn't OldValue null, so why doesn't it like it (in your IF statement)?
Don't understand?That was because I'd copied it from the DeleteRow button... so should that be changed to null too?
If oldvalue isn't null, it's fine - it's if it is null that the problem occurs.
I haven't tried the code I pasted in #208 yet... I think it should work, but not sure.
Also, since I'm deleting the row in that case, surely it makes no difference as to if the other fields' data is 'undone'
Test it then let me know.
Yeah, that works
I think there's just one more query... Like I said, I want to the heading to have a logo which will take the user back to the homepage. To save me having to enter the code each time (and change it on each form if something needs changing), I've tried to put it in the module. However, the code I've tried (below) is rejected because it doesn't like the way I've referenced the Homepage, what am I doing wrong? I've included reports because I will be adding them at some point in the future, they're just not necessary for the database to go live.
Oh, and does the rest of my code need work - code removing etc? I've attached the database so you've got an up to date version.Code:Public Function ReturnHome() Do While Forms.Count > 0 DoCmd.Close acForm, Forms(0).Name Loop Do While Reports.Count > 0 DoCmd.Close acReport, Reports(0).Name Loop DoCmd.OpenForm Homepage End Function
Form name needs to be in quotes!
Good thinking on this, great job.
Damn, so close! I had a little help from the internet
Ok, so that just leaves improving the code... I think. Have you noticed anything that's wrong/too long winded/is repeated too much?
Or is there anything I haven't thought of? I know you mentioned ensuring data validation is done on the data, is this now covered?
Give me some time on this. Off the top of my head: fields on the tables, are they still 255 long? Do you all your Back buttons work?
I'm pretty sure all the back buttons work and the text fields are restricted as much as possible (allowing for some error on my part - not anticipating how long a login could be for instance)
Bit late to think of it now - but for your Behaviours you don't need those three subforms, one will suffice. You could set the record source in the load of Behaviours, then make any changes in the code of the subform if/when required. Should have thought of this sooner!
Your code is behaving well. The line-ups are awful, of course, making it very hard to read - but you already know that. No comments either. What is going to happen is that you will put this database down and a year later you will need to make a change and will have forgotten everything! The more you can do now to make it easier for yourself later on the better.
I always add as much in the code too - instead of "BehaviourID" I will write Me!BehaviourID - making it immediately obvious what I am referring to. Also I "Call" all my functions, instead of just the one work "AssessorUpdate" I write "Call AssessorUpdate", again making it patently obvious what is going on. Sort of like documentation in the code.
You have come a long way and done a good job.
I haven't come that far, I haven't a clue what any of that means or how it would work :')Bit late to think of it now - but for your Behaviours you don't need those three subforms, one will suffice. You could set the record source in the load of Behaviours, then make any changes in the code of the subform if/when required. Should have thought of this sooner!
Yes, I'll go through and tidy it up when I get a minute. I'm not sure what you mean with calling the functions though... does that need to be in the name or just where I'm calling it?
Just as I wrote it, sending the code to a function/subroutine is termed "calling" a f/sub.
Seems too simple... but yeah, seems to work! Thanks for all your help, I imagine it won't be long before I'm back asking for more help... It's been a while since I created reports.
Good luck!
This will solve that problem.
This is the latest version