Search results

  1. S

    List Box Option

    The If statement would adjust the RowSource of the combo box. It would look like this (you might put this in the OnClick event of the checkbox, or elsewhere): If Me.CheckBoxName = True Then Me.ComboBoxName.RowSource = "<SQL Statement or query name>" Else Me.ComboBoxName.RowSource = "<other SQL...
  2. S

    Access Pages

    I am not sure what you mean by "Access Pages" and that the wizard is not available. When you are on a form, how do you place a combo box on it? If it is from the toolbox, and you choose Combo Box, do you mean that you click on the form and you just get a combo box, with no wizard popping up to...
  3. S

    User Level Security, Need [CurrentUser] Tricks

    I can answer a few of your questions, but not all. (In fact, I will look forward to some of those other answers myself!) Question #1 Type: CurrentUser() to get the name of the person that logged in. Questions #2 and #3 I don't know how, from code, to determine a user's group affiliation...
  4. S

    Array count

    Look up the UBound and LBound functions in VB help.
  5. S

    Access Pages

    If you choose the combo box icon and click to place a combo box on your form, the wizard should automatically start.
  6. S

    Access Pages

    Use the Access wizard for a combo box. Choose the 3rd option "Find a record on my form based on the value I selected in my combo box."
  7. S

    button colour

    I don't think you can. However, you can create a label (instead of a command button) and put your code or macro name in the OnClick event and it works the same way. Then you have complete flexibility with colors.
  8. S

    Autonumbering

    Your SQL statement (in the Set rsPartNumber statement) will retrieve more than one record, right? You want to find only the single family record with the highest part number. I don't see in your code where that would happen (either in SQL or VBA).
  9. S

    Pass value from function

    Put the value in a variable the is publically declared, not dimmed. At the top of a module (any module), put: Public MyVariable As Long 'or string, etc. Then in the first form: MyVariable = fMyFunction Then in the second form, use MyVariable where you need it.
  10. S

    Autonumbering

    If you do that, don't bother with a temporary table. A variable in VBA can handle a number. To get the SQL, simply create a query with the MAX function and look at the SQL that the query creates (in SQL view). However, while SQL is the best way, if you can't get it to work, you can cycle...
  11. S

    Multiple Iif

    Use a Select Case statement instead of multiple IIfs.
  12. S

    joining unrelated tables

    You can still use a Union Query. In reading your response, I am not sure if you understood what Helen was getting at. (If you did, I apologize). She was asking if there is a Primary Key involved that remains with the customer when they cancel that would be found in each table. Even if there is...
  13. S

    OK, I'm praying that this can be done...

    DoCmd.RunSQL
  14. S

    Verifying if records exist??

    What about this: Dim db As Database Dim rs As Recordset Set db = CurrentDb() Set rs = db.OpenRecordset("YourTableName",dbOpenDynaset) rs.FindFirst "[SerialNoField] = " & Me.SerialNo If rs.NoMatch Then <<Insert what to do if it does not exist>> Set db = Nothing Set rs = Nothing Exit Sub End If...
  15. S

    Sorting by the last two characters

    Exactly. Unless I missed something (I actually read about the Right function to be sure that I understood it correctly), the Right function picks up the characters from the right side regardless of how long the string is. I even tested it on a field of mine and it worked on strings of various...
  16. S

    Query Challenge - Merge Data

    Excellent presentation of your question! What you wish to do is actually very simple. Use the "Max Of" function to retrieve only one of each person. (You click on the Sigma button up next to the Add Table icon, then in the field you wish to have only one of, choose Max, or First, or Last - all...
  17. S

    Checkbox

    Check out this link. It talked about the same thing. http://www.access-programmers.co.uk/ubb/Forum7/HTML/001829.html
  18. S

    Query range of dates from multiple fields in one table

    Create your parameter as a separate field in the query, say you name that parameter field DateToCheck. In each field with the dates, put <[DateToCheck] as the criterion using OR (different criteria lines for each field to check).
  19. S

    Sorting by the last two characters

    Create a field in your query with the Right function. It would look like this: Year: Right([FieldName],2) Then sort that field ascending.
  20. S

    Checkbox

    You could do that using code, but why would you want to? Store the information in three separate fields and concatenate them in the form or report control when you output the information.
Back
Top Bottom