Search results

  1. R

    Allen Browne ConcateRelated "Enter Parameter Value"

    Ok, so I now know what literal values are and it looks like the Allen Browne solution is no longer viable. Is there a way to concatenate the values from this query into a single textbox in my report without applying literal values? All I want my report to do is group by year then month and...
  2. R

    Allen Browne ConcateRelated "Enter Parameter Value"

    Sorry I didn't realise what QBF was, how do I convert to literal values?
  3. R

    Allen Browne ConcateRelated "Enter Parameter Value"

    I think it's just a simple query: SELECT Year([Release date required]) AS FYear, Month([Release date required]) AS FMonth, Count(tblDataEntry.ID) AS CountOfID, Sum(tblDataEntry.[Estimated new files]) AS [SumOfEstimated new files], Sum(tblDataEntry.[Estimated existing files]) AS [SumOfEstimated...
  4. R

    Allen Browne ConcateRelated "Enter Parameter Value"

    Hi all, I am having trouble with the concatenate function code on the Allen Browne website located here http://allenbrowne.com/func-concat.html I am using the textbox controlsource method on a report: =ConcatRelated("ID", "qryFutureReleaseDate", "FMonth = " & [FMonth]) The report is based on...
  5. R

    Message Box when query return is empty.

    by the way there's some good information on your website :) cheers!
  6. R

    Message Box when query return is empty.

    Nice thanks, I applied the same solution: In Report Private Sub Report_NoData(Cancel As Integer) MsgBox "Selected criteria unable to generate a report. please select another criteria.", VBOKOnly, "Report Status" Cancel = True End Sub In form Private Sub TestNoData_Click() On Error...
  7. R

    Message Box when query return is empty.

    This seems like a better option as the way I've done it runs the query twice. One for the "No Record check" and another for the Report. I will investigate :) EDITED: I just tried it and it still loads the Report after I click "Ok" on the message box. Is there a way to stop it from loading...
  8. R

    Message Box when query return is empty.

    One of my Reports applies a filter from a form hence it is essential to have a criteria: DoCmd.OpenReport "rptSummaryReport", acViewPreview, , Criteria and use this to check for no results DCount("*", "[qrySummaryReport]", Criteria) Others don't require a criteria: DoCmd.OpenReport...
  9. R

    Message Box when query return is empty.

    Yes I did that and also added criteria back in. Thanks.
  10. R

    Message Box when query return is empty.

    Thanks for this code I was able to use it without the strWhat string and linked it directly to my query as follows: Dim inCnt as Integer DoCmd.Hourglass True intCnt = DCount("[Key Field]", "[Query Name]") If intCnt = 0 Then MsgBox "There are no reports for this year.", 64, "Report Status"...
  11. R

    SQL masters Simplify SQL code in Query

    I guess because there are 16 fields to search through the code will always be large. Thank you all very much for taking the time to post ideas here. I will take your suggestions into consideration. :)
  12. R

    SQL masters Simplify SQL code in Query

    Hi all, I have a "search as you type query" that I have created based on the sample database here: http://www.access-programmers.co.uk/forums/showthread.php?t=188663 In addition to the search code I have included filters on the form. When viewing the query it goes down 20 rows and I've been...
  13. R

    Listbox OrderBy

    I run a front end database and I have found that it is a bit slow when it reorders the fields. there's a bout a 5 seconds delay. It there a way to get the data contained in the listbox to sort the fields by accessing an intermediate location (for example from Ram memory) instead of...
  14. R

    Inserting a variable data source into SELECT Statement

    Will do. Thank you.
  15. R

    Inserting a variable data source into SELECT Statement

    The code I posted above was just as an example but thanks for the info on the date and time. I will remember that they are reserved words :) James code above gave me the idea of using the " & stringVar & " but it didn't work. Your post reassured me that it was the right direction to head in so...
  16. R

    Inserting a variable data source into SELECT Statement

    The textbox is merely to identify what query to use. Here's all of the code: Dim strOrd As String, strSql As String, strQuery As String If Me.Text1.Value = "Boss" Or Me.Text1.Value = "Admin" Then strQuery = qrySearch Else strQuery = qryRestrictedSearch End If Once the query is determined, the...
  17. R

    Inserting a variable data source into SELECT Statement

    Hi all, I have a ListBox that uses two different queries based on a text box value. This is for security purposes. One query shows all records and the other query hides some records when there is a certain flag. When the user accesses the form the text box is given a value and the appropriate...
  18. R

    Listbox OrderBy

    It's amazing that after so many years this code still works really well even in Access 2013. A big thank you to @mhartman.
  19. R

    Sorting a ListBox with multiple source rows

    Thanks. By the way the forms prompts for Parameter values when it opens. I'll have a thorough look at it tomorrow at work. Thank you for your help.
  20. R

    Sorting a ListBox with multiple source rows

    The same happens with "ItemData(1)" in the search code: Me.Subformulier_qryDynamicSearch = Me.Subformulier_qryDynamicSearch.ItemData(1)
Back
Top Bottom