Hi,
In the properties of your subform should be 'Link Child Fields' and 'Link Master Fields'
You need to set these up properly (click on the build button on the right and the wizard should take you through it).
RFletch
Hi,
I have a query which returns values based on financial years, stored as strings. In the criteria box I reference a text box called 'daterange' on a form called 'grant discounts' In the criteria box I have the reference
Forms![Grant Discounts]![Daterange]
which returns no records.
Here is...
Hi,
Here is a bit of code I wrote to find a record based on its ID number. The user clicks on a button called "Find record" on the form and a small form appears in which they enter the id number they want. Upon pressing enter the following procedure is called. Text1 is the text box...
Here's how I would do it:
If you put the following code to occur when the OnClick property of your button is activated, then it should be ok.
I haven't checked it though, so there could be the odd typo, but let me know if it works ok.
RFletch
dim db as dao.database
dim rcd as dao.recordset
dim...
Hmm,
I tried that bit of code and it does seem to remove the start and end quote marks, but still I can't get it to work - even with a date range of 1!
I'm going home now for the weekend, so I'll tackle this problem again on Monday.
Have a good weekend!
Thanks Robert,
but no it doesn't!
The value in DateRange passed from CalcFinYears is ""98/99" Or "99/00" Or "00/01" Or "01/02" Or "02/03""
having checked this in VB debugger.
I need some way of removing the opening and closing double...
Thanks for your help there guys.
I used the """" idea from mstrmage1768 because it seemed to be slightly quicker to implement.
Although I do now consistently get
"97/98" Or "98/99" Or "99/00" Or "00/01" Or "01/02" Or...
Sure,
Here it is. Note that the function (actually called calcfinyears) calls another function getynum, which I have also included. The getynum function returns a number which is relevant to the Year array. I hope this is apparent on inspection of the code.
Public Function CalcFinYears()...
Maquis,
Thanks for your reply. That won't actually work, because the actual values stored in the table are financial years, so I can't use specific dates.
Hi,
I submitted this message yesterday and had a couple of replies, but none have been any use, so here goes again!
I have a form which allows a user to select two financial years - one is the beginning financial year and the other is the end which feeds into a query which outputs all records...
Hi,
I'm not sure if I've understood your question correctly, but here goes.
What you need to do is set the date range in the actual query that underlies the report, not in the code where you call the report.
For example if you had a form called 'Input Form' and a control on the form in which...
Hi,
You need to display the form in datasheet view rather than the normal form view.
If you want to have other controls on the form then the best idea is to have the fields you want displayed in a subform in datasheet view.
Hope this response is clear.
RFletch
Yes, it is a string concatenation. Here is the function (actually called CalcFinYears()). Note that getynum calls a function which returns the relevant number to use in the Year array.
Public Function CalcFinYears()
Dim yfrom As String
Dim yto As String
Dim Year
Dim endstring
Dim i, startnum...
Are there always the same number of sales offices in the table? If so you could have an integer variable for each, eg
dim sales1 as integer, sales2 as integer, sales3 as integer
then set each variable to 0 and start at the beginning of the table and count through, incrementing each sales office...
I have a form which allows a user to select two financial years - one is the beginning financial year and the other is the end which feeds into a query which outputs all records between the two financial years.
Because Access has no data type for storing financial years, I have to store them as...
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.