Search results

  1. June7

    Relationships

    I advise not to use same name for primary and foreign key fields. One way to fix that is to use suffix, like: ComputerID_FK.
  2. June7

    Sum If

    I tested this bad expression in a textbox on report and get "Data type mismatch in criteria expression." and report won't even open. If expression is in a query, why is it preceded with = sign?
  3. June7

    Sum If

    =Sum(IIf([Client Title]="Chairman", [$Medicare], 0)) Are there other conditional Sum expressions? Strongly advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention.
  4. June7

    Relationships

    Yes, that is possible (something I have done). However, still not sure it is best approach for OP to repetitively save computer names in Drives.
  5. June7

    To directly open the database

    Oops, memory failed me, yes, just Shift key. That's why it's called "Shift Key Bypass"!;)
  6. June7

    To directly open the database

    Bypass what menu? Use Ctrl+Shift when opening database to bypass automation settings. Then use LinkedTableManager to change link paths or use VBA procedure to change links.
  7. June7

    Relationships

    @plog, but if there is no Computers table that will mean repetitively saving computer names in Drives table. Names can get lengthy. Even if there is only the one attribute field (computer name) in Computers table, it is still useful as parent or lookup table. Certainly makes building a combobox...
  8. June7

    Relationships

    I didn't quite follow about "eliminating the join". If you saved computer name into Drives, would not need to join tables. Query would be like: SELECT * FROM Drives WHERE [Drive Letter]="C:"; Are you really saving the colon with drive letter - why? Strongly advise not to use spaces nor...
  9. June7

    Relationships

    You keep Computers table so you don't repetitively save computer name in Drives table. As I pointed out in post 5, saving text might be acceptable for short identifiers like gender (M/F) or Y/N or drive letters. Otherwise, save record ID into child table, not the computer name - unless you...
  10. June7

    Relationships

    Listing folders and subfolders - to what depth? Why are you trying to replicate Windows file manager?
  11. June7

    Relationships

    Your posted table presumes a single computer and one set of associated mapped drives. The_Doc_Man describes a parent/child relationship - each computer can have multiple drive letters and each drive letter can be used for multiple computers. If you want to save detail info on computer...
  12. June7

    Solved OpenArgs From SubF.CurrentRecord[FieldName]

    Not saying CONTROL cannot be referenced, saying a RecordSource FIELD that is not the ControlSource of any control might not be able to be referenced in a ControlSource expression. I seem to remember having this issue on reports back with 2003 or 2007 but never on form. Now I am using 2021 and no...
  13. June7

    Solved Why Some Calculated Fields Will Not Work In A Query?

    As already stated, can reference alias (or constructed) field name in another calc but don't include the table or query name. So in addition to the SQL Mike shows: SELECT Table1.*, Length*Width AS AREA, AREA*Depth AS VOLUME FROM Table1;
  14. June7

    Solved Why Some Calculated Fields Will Not Work In A Query?

    Use dot instead of bang. Why did you have bang (!) instead of dot? Query builder will use dot with fields. Plog's second point is valid. If a table is not pulled into query, can't directly reference any of its fields.
  15. June7

    Solved Why Some Calculated Fields Will Not Work In A Query?

    Actually, can use a calculated field alias name in another calculated field. Except for extraneous comma before FROM (which I removed), this is perfectly legit: SELECT A, B, (A + B) AS AB_SUM, (AB_SUM *2) AS DoubleAB_SUM FROM YourTable; What cannot do is use that alias name in other clauses...
  16. June7

    Select Statement Problem

    SQL definitely can't handle the embedded Column property (not in query object or VBA built string). Use parameters or concatenate control reference. None of the parenthesis in that original WHERE clause are actually needed. If system is U.S. date, then formatting date probably not needed...
  17. June7

    Inserting Dates

    Why are you including spaces in that date construct?
  18. June7

    Inserting Dates

    To extract year: Year(Date()) You want to add 1 to year and save 01 Jan 2026? Yes, why not include this calc in the INSERT action and why not a date instead of string? SELECT ..., '1/1/' & Year(Date()) FROM ...
  19. June7

    OpenQuery and TransferSpreadsheet?

    Why are they opening query? How many records for 300 customers? Does Transfer pull from open object? I don't think so.
  20. June7

    Solved OpenArgs From SubF.CurrentRecord[FieldName]

    I just tested with Access 2021 (MS Office Pro Plus). Form still opens the "old way" - referencing field not bound to control as criteria works. I tested with RecordSource set as table and SQL. Then I tested same with a report - also works. Even after closing/reopening db - RecordSource is not...
Back
Top Bottom