Search results

  1. P

    Occasional Quotation Marks

    To use your example, you could use the Replace function to, er, replace the (code for the) double quote in the text with (code for the) 2 double quotes , ie Me!Description.DefaultValue = cQuote & Replace(Me!Description.Value, Chr(34), Chr(34) & Chr(34), 1, -1) & cQuote Alternatively, you could...
  2. P

    Report with row data as columns

    The problem here is where you say you 'need to add a 1,2,3,4 etc for each set of comments' You could use a crosstab query as you are actually summarising the data and the data in [ID_Comment] is incremental (1, 2, 3, 4 etc) [ID_Clarification] although I suspect it's incremental across the whole...
  3. P

    Yes/No field to show all records

    I'm not too sure if the false part (Yes or No) of you first iif statement is valid. If you always want to show yes and only want to show No when [txt choice]<>4 maybe you could use a condition of; Yes or ([Forms]![frm selection]![txt choice]="4")
  4. P

    Selection in combo1 limits possible selection in combo2

    http://access.mvps.org/access/forms/frm0028.htm
  5. P

    Email An Invoice

    Sorry, you also need to amend a line in Send_Monthly_Invoices Application.Run "SendInvoiceEmail", strEmailRecipient = rstInvoices![EMAddress] should be changed to Application.Run "SendInvoiceEmail", rstInvoices![EMAddress] It was passing 0 as strEmailRecipient was not equal to...
  6. P

    Form based on a query

    Sorry but I don't really understand what you mean by your follow up question. Check boxes can be added to the form and updated like 'text fields'
  7. P

    Email An Invoice

    Your SendInvoiceEmail subroutine is assigning the email address to the optional variable called AttachmentPath. One way to fix it would be to change the line Sub SendInvoiceEmail(Optional AttachmentPath) to Sub SendInvoiceEmail(strEmailRecipient as string, Optional AttachmentPath) and then...
  8. P

    Form based on a query

    You'll need to add code to the AfterUpdate event to the controls used to capture the Client Name and/or Client ID info to 'find' the appropriate info (or 'refresh' the form depending on how you've designed it) Alternatively, try adding a Combo Box to the form and use the wizard to 'Find a...
  9. P

    Query results change when I add a field

    You want the last status of each Tool? ie 'CHA Evaporator' is 'In Maintenance'? If so, use the Last function on Tool Status in the same way you've used the Max function on ID
  10. P

    Return records with certain criteria

    I don't really know how your data is stored (I've already made one assumption to offer a solution) so can't really comment on whether your suggestion is an option
  11. P

    Return records with certain criteria

    If you only have 2 fields, StaffID and TestScore, you can build a query grouped on StaffID showing maximum TestScores over 70%. These are the people that have passed, ie qry_Passes SELECT tbl_YourTable.StaffID , Max(tbl_YourTable.TestScore) AS MaxTestScore FROM tbl_YourTable GROUP BY...
  12. P

    Query results change when I add a field

    It looks like you're grouping on the additional field and getting unique results for each Tool_Name/'Tool Status' combination
  13. P

    Columns to rows

    It probably wouldn't be very fast but you could use the DAvg function for this Create a query with Table2 as the source, add fields Date, PlantNo, ParamA, ParamB, ParamC and then create calculated fields for the Mean fields. 'Param1 Mean' would be (something like): DAvg("Param1","Table...
  14. P

    How to move selected rows in a query into another query

    Unless I'm missing something (like why VBA has been mentioned and what you mean by 'moving rows' from one query to another), can't you simply use query #1 as the source for query #2 and group on the 'column' two and return the First values of 'columns' one and three?
  15. P

    Out Sick

    I don't know the answer to your question but for info, this is the first time I've been here for a few weeks and I didn't have to log back in
  16. P

    Calculated field based on combo box selection

    You can create the date element using the Format function In your example using today's date it would be Format(Date(),"mmdyyyy") although I'd be more inclinded to use Format(Date(),"mmddyyyy")
  17. P

    open report

    What format is the date in the form? VBA expects is expecting mm/dd/yyyy and will only use dd/mm/yyyy if the former gives an invalid date There are various ways to resolve this, one being to change the WhereCondition to; "[Date_1]=#" & Format(get_date, "mm/dd/yyyy") & "#"
  18. P

    Iif

    What parameter was it asking you for?
  19. P

    Collate two Reports to printer

    Assuming your employees are held in a table called tblEmployees and are uniquely identified in a field called EmpID Sub PrintReportsByEmployee() Dim sSQL As String Dim rs As Recordset sSQL = "SELECT EmpID FROM tblEmployees;" Set rs = CurrentDb.OpenRecordset(sSQL, dbOpenSnapshot) While Not...
  20. P

    Collate two Reports to printer

    Is adding one of the reports to the other using subreports not an option? If not, you could use code to print out the (filtered) reports in the order you require. eg For each employee Print rpt1 (filtered for single employee) Print rpt2 (filtered for single employee) Next
Back
Top Bottom