Search results

  1. M

    How to check if recordset field *exists* (not whether null or not)

    Try something like this: private function exists dim myfield as field For each myfield in rst.fields if myfield.name = "fieldname" then exists = 1 end if next myfield end function
  2. M

    Difficult 'points' problem - allocate by rank? Dynamic?

    Hi there, I had a bit of a read of this situation and it seems to be a nice challenge. I work for schools and have had similar 'normalization' issues with markheets that include all of the assessment tasks given. What you want is to add the events before the competition, there can be 1 or...
  3. M

    Arrh..another "blank form" question

    Create the query that underlies the form. Build it up slowly, checking the datasheet view each time you even add a table to the design grid. Youll get to the point where the query works, shows data etc, then you add one more table, and it doesnt, and theres your problem.
  4. M

    Just a simple problem, any help?

    If you are entering the data on a form, place a text box in the form header and use a Count function to get a count of the records underlying the form. Place some code in the Form_BeforeUpdate event that does something like this. dim intMBR as vbMsgBoxResult If txtCount.value = 20 then...
  5. M

    Using one field in mutiple tables

    All the tables should exists in a one-to-one relationship. I take it what your after is that when you insert a new employee, you would like to create new records, with that employee ID number, in all the related tables. Ive have had this problem before I a decided to solve it via VBA and...
  6. M

    Parameter to Query

    Use a multiselect listbox on your form to select which numbers you would like to use in your criteria. Concatenate each listitem selected into a string as such: IN (1, 2, 3) Use this string in the where clause of your SQL statement ..... WHERE number IN (1, 2, 3)
  7. M

    counting like autonumber

    Could you reference the Microsoft Excel Object Library and use the RANK() function within a query? I can see that your query works Pat, just wondering if RANK would work also
  8. M

    password protect a form

    Hi, I have seen somewhere before some code that enables you to change the character displayed by an input box to be '*', for the purpose of making an input box into a password entry. I believe I saw it on tek-tips. You may wish to investigate it.
  9. M

    Controlling Scroll Bars

    Place the other 2 subforms as subforms on subform A, but have the Parent fields still referencing the Main Forms link field Just a stab in the dark...
  10. M

    Conditional formatting in a query expression

    I dont think SQL cares about the format of string, thats something for the UI to take care of. I think I know what it is your trying to do. Have you though perhaps about generating the reports in Word instead of Access? That way you can set the format on the merge field, and you can...
  11. M

    Need assist to find overlaping Dates

    Just trying to understand the data in your inported table... Client A may have Contract B that starts before Contract A (assigned to Client A) end, and this would constitute 2 records in the table. And i guess you would like to grab all the occurances of this situation?
  12. M

    Control Z-index

    Try using frames to group your controls. My suggestion for UI Design is to try and stick to the principles used by Microsoft. Bills not a multi gozillianairre cos his UI designs are up the creek. Keeps colors simple. A good reason in support of this is some users will be color blind and it...
  13. M

    Create a New Table with new fields using a Query.

    MYFIELD: Count(newtable.somefield)
  14. M

    Displaying the total count of a single field query

    Are you attempting to place the filter criteria in the same column as the Count field? That could be causing you troubles. Otherwise it should be as simple as... SELECT Count(table.field) FROM table WHERE table.field = filtervalue;
  15. M

    Criteria in a form control

    Could you post the SQL statement that your attempting to execute? The WHERE clause should look like WHERE sometable.somefield [forms]![someform]![somecontrol]
  16. M

    Conditional formatting in a query expression

    Once the fields are concatenated like that, I dont think you can change the formatting of a substring within that field, cos the formatting applied to the control, applies to the entire field.
  17. M

    increment query field

    A simple query wont do it i dont think. You could try a correlated sub-query. Like creating a running sum sought of except you want to create a running count OR... Do it using VBA. Grab the recordset from the table and loop through each record inserting the values into the table, along with...
  18. M

    IF-ELSE Conditional Operators for Simple Queries?

    If (Choose_Type = 1) Return (AAA) // Final_Value == AAA If (Choose_Type = 2) Return ( BBB) // Final_Value == BBB Else Return (0) Try the SWITCH structure, much like the CASE structure in SQL. SELECT SWITCH (choose_type = 1,"AAA",choose_type=2,"BBB",choose_type NOT EXISTS ("AAA", "BBB"), 0) AS...
  19. M

    Grouping by Week, but displaying week commencing date

    Create a query with a field that returns the date of the Monday immediately before the 'Date' field SELECT Table1.date, Weekday([date]) AS WeekDayNumber, [date]-([WeekDayNumber]-2) AS MondayPrior FROM Table1; Also, inspect the DateGrouping property in Reports
  20. M

    password lockout

    your right ghudson... I have never dealt with access security in access before 2000. It seems that they have made a few changes (for the better) In 2000 and later you are able to do as i suggested. Access 2000 doesnt have the Workgroup Administrator option in the security menu that you can...
Back
Top Bottom