Search results

  1. K

    count certain records?

    Another way to go, particularly if you need to separately use the alpha and numeric parts of your field... Your 'aaa########' format field could also be replaced with two separate fields, one for the 'aaa' part, and one for the 8 digits. Then searching or counting the 'prefix' part is simple...
  2. K

    Convert Metric to Fractional Inches

    Where I had: Else MakeFraction = Str(IntegerPart) & " " & Str(Numerator) & "/" & Str(Denominator) End If Use this: Else MakeFraction = Str(IntegerPart) If Numerator <> 0 then MakeFraction = MakeFraction & " " & Str(Numerator) & "/" & Str(Denominator) End If End If
  3. K

    Convert Metric to Fractional Inches

    I never thought about that possibility.... You need to add another If statement to work around numerator=0, because my present fraction reduction loop is stuck in an endless loop (since zero/2 is always = zero). try this... Before the 'While' statement, add If Numerator<>0 then After...
  4. K

    how do I rollback an append query?

    If I read your post correctly, you want to eliminate all new records if there are duplicates, not just the duplicated ones, so... Step 1: If you want to guarantee the barcode value in your table to be unique, ensure that you force this by creating a unique index for it in table design view...
  5. K

    Convert Metric to Fractional Inches

    raskew: If you read Alvin's post, I'm not sure that he wants to do any metric conversions at all. I think he merely wants to convert a decimal value to a fractional one. Therefore, I think all he needs is my function, or your zfraction2 routine. i.e: [YourFraction]: =zfraction2(.874)...
  6. K

    Convert Metric to Fractional Inches

    My function was NOT intended to do Imperial to Metric unit conversions. Its purpose was to convert a given value to a fraction. So if you want to convert meters to inches expressed as a fraction, you need to call it like: TheInches: =MakeFraction([YourMeterValue]*39.37,16) If you want the...
  7. K

    Group Totals

    In a query, include your contract# and amount fields. Create a new Calculated Field such as: BaseContract: Left( str([YourContractField] ),5) This will return a new (text) field which should match the base contract for all records (including those which are base contracts). Now you should be...
  8. K

    How to write query that can recursively check values in a column

    Nouba: Your method of creating a generic function for any fieldname is quite slick. Minor quibble: In your GetRecursive() function, you added the following note: ' This is what you need if you use -1 for the root instead of Null 'strSQL = strSQL & "WHERE UnitParent = -1" However, I...
  9. K

    How to write query that can recursively check values in a column

    I would make a vba function... This not going to be correct syntax... Create a public function (let call it GetStaff) The code will resemble public function GetStaff(ThisUnit as Long) as Long {dim statements...} {open a recordset of all records that have ThisUnit as parent} {for each...
  10. K

    Count True Values

    Since 'False' evaluates to '0' and 'True' evaluates to '-1', just create a summary query and sum your Boolean (Yes/No) field.
  11. K

    I got this far.......

    Here's my two cents... You seem to already have a query that returns a field for Daily Percent Gains/Losses (call it DPGL). I'm assuming your query contains a ClientID, and a date field (call it TheDate) I think you need a vba public FUNCTION that takes three arguments...
  12. K

    Math and Syntax Query Problems!

    Elimination of Div0: Create a new query that includes all of the fields from your table(s) that are now the source for your query. Add <>0 as a criteria for [AT01]. Have your problem query use this new query as source. I suspect your overflow is due to divide by zero. BTW, As a personal...
  13. K

    Validation Rule

    Create a summary query from your table. Add each of the 3 fields, selecting 'Group By' as the value in the "Total" row. Add a fourth field using just about any field from your table and select "Count" in the totals group. You can even add ">4" (no quotes) in the criteria row of the Count...
  14. K

    Need 'bulletproof' security for tables in network environment for a single db

    Thanks all for your time on this. So to summarize: I should follow The_Doc_Man's plan from his first post on this thread to secure my database. I should ensure that ALL users of this or any other secured database ALWAYS use a shortcut with the /wrkgrp switch set to a .mdw file that should...
  15. K

    Need 'bulletproof' security for tables in network environment for a single db

    ghudson: I re-read your post in light of what The_Doc_Man said: "OK, now what will happen is that if the forgetful user comes in without joining the workgroup, they come in as user ADMIN - but that user has NO rights whatsoever. " Now that I understand what you said, I apologize for my...
  16. K

    Need 'bulletproof' security for tables in network environment for a single db

    ghudson: Thanks for your reply, but... I don't think I can use your approach for the reasons outlined in my original post on this thread. My previous post was an attempt to avoid the security login headaches on Access files that do not require it, in a network environment where at least one...
  17. K

    Need 'bulletproof' security for tables in network environment for a single db

    The_doc_man said: "The way around this is to remember to join your default workgroup before entering any non-secured database." Assume I enact Access security on this db with all of the steps The_Doc_Man described. Can I then use startup shortcuts that specify the network location of a copy of...
  18. K

    Need 'bulletproof' security for tables in network environment for a single db

    By the way, is there a way to use the fact that all of my Access users have previously logged into the Windows 2000 network domain to avoid/replace the need to "re-log" into Access each time? Life would be good if something could be stored in each user's network profile once and for all.
  19. K

    Need 'bulletproof' security for tables in network environment for a single db

    Thanks for your replies, everyone (particularly The_Doc_Man). I'll have a go at this, but I'm sure to be back with a few specific questions.
  20. K

    Need 'bulletproof' security for tables in network environment for a single db

    I've got a problem, and I couldn't find a good answer by searching this forum, so... Up until now, I've been able to avoid using Access security on our network databases, because all users of a given db needed similar privileges, so I have addressed security so far by careful network directory...
Back
Top Bottom