Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RFletch

    Referencing query criteria to a control on a form

    Hi, Thanks for your reply. So how would you build this in SQL? RFletch
  2. RFletch

    Running Acces Macro/Module from VB

    just type docmd.runmacro "macroname" RFletch
  3. RFletch

    Form / Subform Link?

    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
  4. RFletch

    Referencing query criteria to a control on a form

    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...
  5. RFletch

    Need a FIND tool for VB6

    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...
  6. RFletch

    Refreshing a Database - Please Read

    Hi, When you say it has problems, can you explain exactly what happens? Rletch
  7. RFletch

    EXTRACTING DATA FROM A TABLE

    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...
  8. RFletch

    Setting criteria from VB

    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!
  9. RFletch

    Setting criteria from VB

    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...
  10. RFletch

    Setting criteria from VB

    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...
  11. RFletch

    Setting criteria from VB

    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()...
  12. RFletch

    Setting criteria from VB

    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.
  13. RFletch

    Setting criteria from VB

    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...
  14. RFletch

    Why won't this DoCmd.OpenReport command work

    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...
  15. RFletch

    Show Multiple Records in Form

    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
  16. RFletch

    Using VB functions to set criteria for queries

    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...
  17. RFletch

    Query / Datasort

    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...
  18. RFletch

    Using VB functions to set criteria for queries

    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...

Part and Inventory Search

Back
Top