Search results

  1. B

    Dlookup of string returns with # on either side

    Aha... These once upon a time were hyperlinks. So hyperlinks brought up as strings have #'s? Thanks
  2. B

    Dlookup of string returns with # on either side

    I don't think you could describe it as looking like a date... It's a file path, so it's something like "Y:\00 Business\Client Name". It's clearly a string (and the field type is short text). Can't insert a date into the table right now to test, but what would that tell me? For the minute, I've...
  3. B

    Dlookup of string returns with # on either side

    Hi... I've got a string (a file path) which I call up using a Dlookup. It all works fine, except there's a "#" on either side. This seems to only happen sometimes. It's definitely not there when you view the database directly. I've also compacted and repaired the backend. Any ideas/experience...
  4. B

    Count distinct in a linked subform

    This is solved now, thanks to Ranman256. I've edited my previous post to clarify this. arnelgp: No, only one client per project. Its the other way round: I'm finding the number of clients we've done projects for (to see e.g. we're doing 10 projects, but only for 2 clients). Thanks for the...
  5. B

    Count distinct in a linked subform

    Hmmm... Apologies for not clarifying this earlier, but I use this subform multiple times on a single parent form (so you can see data over the last 8 quarters). Which means that each subform appearance has its own query. So I can't filter the DISTINCT query to be the correct quarter and year, as...
  6. B

    Count distinct in a linked subform

    Hi, I've got a subform I made for calculating KPIs. Essentially, the parent has the quarter and year input, and links to the child. The query is fairly straightforward: SELECT Projects.*, DatePart("q",[Completed_date]) AS Qtr, Year([Completed_date]) AS Yr FROM Projects WHERE...
  7. B

    Child subforms No Current Record

    But I specifically want to display that aggregate cost on the parent. So, even if it were a calculated value, I'd still have to send a number or requery command to the parent, wouldn't I? Also, no. Although I would prefer to limit what the user can do, I've been specifically asked not to. If...
  8. B

    Child subforms No Current Record

    Ok... So does the child recordset have access to all the fields in the parent recordset? The parent holds the overall cost (part of tblProject, say), while tblCosts includes the itemised costs. The parent just queries tblProject.* on Project_id (single record) while the children query...
  9. B

    Filter subform by multiple textbox options

    Unless I'm misunderstanding what you mean (entirely possible!), AND/OR is expressed as OR. As for your overall question, you could write some VBA to go through your multiple textboxes, and build the query up. So if there is something in each box, its filter gets added to the string.
  10. B

    Conditional Formatting

    No, you can use values of other fields. You need to choose the "expression is..." option. Then define the logic, e.g. [ChkBox] = True OR [OtherFld] = False.
  11. B

    Child subforms No Current Record

    I have a Parent form with some continuous Child subforms. These forms allow additions, edits, and deletions. When the user enters data into certain fields, AfterUpdate fires some VBA to do some maths, and populate some fields in the Parent form. When you go back and edit one of these fields in...
  12. B

    ComboBox: Display value not in query

    Thanks for the input. It got me thinking... Tried: SELECT ID, FullName FROM tblUsers WHERE (tblUsers.Active = Yes OR tblUsers.ID = [Forms]![DocFrm]![UserID]); But for some reason it would pop up a box asking for the user id. So I wrote an OnCurrent sub to capture the Form's user ID, and write...
  13. B

    ComboBox: Display value not in query

    I have a ComboBox where user is selected. However, this is filtered down to only include active members of staff. What I'm trying to do is set the Row Source for this ComboBox to display the staff name, even if they're not active. So, I currently have: SELECT ID, FullName FROM tblUsers WHERE...
  14. B

    Combo box selected value

    Have you set the TempVar as the default value for the ComboBox?
  15. B

    Joining 4 tables and multiple relationships

    Thanks, both. Am I correct with the LEFT and INNER joins? tblA is a single record, the others are multiple.
  16. B

    Joining 4 tables and multiple relationships

    So, I'm trying to learn SQL a little better, to avoid abuse Dlookup, and generally use good practice. Now, the table setup probably isn't quite ideal, but it is what it is at this stage, and there's no going back. I'm trying to figure out how to join 4 tables, but with two of the tables being...
  17. B

    Sending text to Excel cell - Carriage returns disappear!

    Indeed it does! I'm not ashamed (ok, well maybe a little) to own up to it.
  18. B

    Sending text to Excel cell - Carriage returns disappear!

    Right. So although I had tested Chr(13) & Chr(10), I apparently didn't spot that it actually worked. This is not my day. Apologies for wasting your time.
  19. B

    Sending text to Excel cell - Carriage returns disappear!

    Wrap text is on, and it doesn't make a difference if it's off. Wrap text will only line break text that reaches the end of the cell, it doesn't have any effect on internal line breaks (using alt+enter or any of the vba methods). In the formula window, the text is clearly shown as concatenated...
  20. B

    Sending text to Excel cell - Carriage returns disappear!

    It's just a cell (which I tried to imply in my first post). The reason it's different from what I wrote before is I don't know. But it doesn't work if the carriage return is in the vba string.
Back
Top Bottom