I made it...
I must be sleeping!!
Thanks guys. You came through again...! The code was working, I was using it wrong. (Not used to SQL view.. :-) )
Have a star!
Hi TheAceMan1..
I'm not a programmer, so I'll just have to take your word for it... :-)
To me, it made sense to use the form that was already made, and ad a little more functionality to it. Since I already had the report and form made, and the code was in there I thougt that this was the easyest...
Thanks PHV, but that did not do it.. :-)
It lists both with and without sailed date. I wanted a separate report for those without sailed date, so when you tick the box it should ignore the "from" "to" - fields, and only list blank sailed dates...
Am I making sense? :-)
I have a form that prints a report based on a ship's sailed date. Some ships have no sailed date, and I would like to print those separately. To achieve this I have put in a checkbox, that when is checked only those ships with sailed date = null will print:
The checkbox is called "SD", and the...
To be honest with you I'm a highshool teacher, and all of this is pretty new to me. I'm trying to learn, but I feel the learning curve is a bit steep...
Have been kind of thrown into this by a company that in the beginning was just looking to change some reports layout...
update:
It does not work if I choose the "all" criteria in the combo...
Error saying: the expression is to complicated to be evaluated...(something else in norwegian)
I fixed it by adding this line to the cmdReportPreview_Click():
DoCmd.OpenReport "rptAVD02PrincipalCommission", acViewPreview, , "[OrderNumber] >= " & Me.ONrFrom.Value & " AND [OrderNumber] <= " & Me.ONrTo.Value & ""
how can I get results without entering ordrnumbers in the fields. I know I...
Very interesting JoAtWork..
So how can I implement the ordernumber from/to in this code?
In the query I have tried between [] and () but it stops when nothing is filled out.
I am not a programmer so this is very difficult for me, but I'm learning.. :-)
Thanks for reply TimTDP.
Not sure hvat you mean...
The report is based on a query. How would you suggest using the "like"-operator in this.
This is my query in sql-wiew:
SELECT AVD02Projects.Projectnumber, Principals.PrincipalName, Clients.ClientName, AVD02Projects.OrderNumber...
This is tricky..
I have a Form that produces a report. The first control is a combobox vith a list of names. I have also made it possible to choose "all" in the list.
The second control is for getting orders with date "from and "To".
The third is complicating things for me.
I would like a...
Hi PHV...
I figured it out,but could not have done this without you. You put me on the right track...
I played with the code that you precented me and I finally got it to work...
The code that worked for me is:
WHERE (((AVD02Projects.OrderDate) Between...
could it have something to do with fact that not all of the options in the list will generate a result. There are principals in the list that has no orders. If I try to select these principals, the report wil generate, but with "#error" instead of values. Is there a way to ignore all principals...
Sad to say that did not do the trick... Got an error message saying "the expression is to complicated to be evaluated...."
When I changed the wiew from SQL to what I normally use(not sure of the english word here, but it's the one with grids and you can se the tables and queries) i noticed that...
Thankyou for quick response. I'm working on this now, so this is perfect.. :-)
Hope this is what you are asking for...:
WHERE (((Principals.PrincipalID)=[Forms]![rptAVD02PrincipalCommission]![PrincipalID]) AND ((AVD02Projects.OrderDate) Between [Forms]![rptAVD02PrincipalCommission]![PeriodFrom]...
Very kind of you to help me... here is the code:
Private Sub cmdReportPreview_Click()
On Error GoTo Err_cmdReportPreview_Click
DoCmd.OpenReport "rptAVD02PrincipalCommission", acPreview
Exit_cmdReportPreview_Click:
Exit Sub
Err_cmdReportPreview_Click:
MsgBox Err.Description
Resume...
Update...
I got this code to work as far as the "ALL" is showing in the combo, but it is not listing all in the report...
If I choose one of the principals in the dropdown list its shoving that particular Principal in the report...
SELECT Principals.PrincipalID, Principals.PrincipalName...
I have been all over this forum trying to figure out how to add "all" to my dropdown list. I have tried everything, but I`m stuck.
My version of access is 2003, and its in Norwegian if it matters. (I know there is something with ; insted of ,)
The error message I get form the RowScource...
Thank you for quick replay
Not sure I got this right.
The mainform is called "AVD02Projects" The textbox in the main form is called "ProjectValue"
I would like to copy this to a textbox called "InvoicedCommissionAmount" in the subform called "AVD02Projects_subInvoices"
There is allready an...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.