ChatterBank2 mins ago
Access
3 Answers
I promised i wouldn't do it, but i just had to, it's another access question, sorry! I swear i've never had this much trouble with any other program. OK, this should be simple, i'm on a report, and when i try and make something with the control source =[Date Due Back]-Date() i get a syntax error. I tried making a new text box, just for the date, and put the control source as =Date() and i got the same error, i even used the in-built expression builder, and i got the same error! Thanks for the help.
Answers
Best Answer
No best answer has yet been selected by aceizace. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.Access is major confusing isn't it? I am learning myself and it's a nightmare, I'm almost out of hair LOL - well, if you don't get any help here there is fantastic website called http://www.computing.net
which is totally free to join and you can even look up previous answers with the search facility, theres loads of previously answered Access questions on there ;o) Hope this helps and good luck :o)
I'm presuming that you have a field called Date Due Back and you want to subtract todays date from that date ? Giving you the amount of days that a video is over it's loan period ?
I have created this myself. The correct syntax is =[Date Due Back]-Date(). I'm not sure where you are going wrong here.
Create a new text box and in the control source of the text box put the above formula. Make sure that your Date Due Back text box is actually called Date Due Back and that this is not just the label.
If you are still getting problems post some more info. Is your report based on a query or a table ?
I have created this myself. The correct syntax is =[Date Due Back]-Date(). I'm not sure where you are going wrong here.
Create a new text box and in the control source of the text box put the above formula. Make sure that your Date Due Back text box is actually called Date Due Back and that this is not just the label.
If you are still getting problems post some more info. Is your report based on a query or a table ?
Lol, you've been following well rinkytink. That was the expression i used, it worked for a few days, then i tried to change the 'date due back' in one of my entries, and it stopped working. I had/have a default mask on it, so it was entered in the correct format and everything.
The report is based on a table.
What i don't understand most is why i get the same error when i try and make a box for todays date. :-S