Search results

  1. M

    Event for add-record nav button

    Hi, I have a form in which I a Key field - Year. I lock the field to prevent crytic error messages from Access. However, when the user presses the add-record navigation button, I want to unlock this field. But I can't figure out what event occurs when the user clicks this button. Any help...
  2. M

    Queries and Constants

    Thanks Pat. That's what I thought. It appears that the same is true for forms and reports as well.
  3. M

    First Middle Last name separation?

    Add the three new fields to the table. Then use the code below. Here is the DAO code: dim db as Database dim rs as Recordset set db = CurrentDB set rs = db.OpenRecordset("Table Name") With rs .MoveFirst Do until .EOF !fname = FirstName(FullName field) !MI = MI(FullName...
  4. M

    Running Sum Problem

    I don't believe that this is possible in Access or even in SQL Server unless you use a cursor. In Access you have to iterate through the recordset and increment the running sum as you go and store the result in a temp table.
  5. M

    Queries and Constants

    When ever I try to use a constant in a Query, the query treats it as a parameter. It asks the user to provide a value. Is this the way Access is designed? Or am I doing something wrong? Will I have to use a public function in order to use the constants?
  6. M

    "IIF" Function

    According to the Litwin et al tome on Access, you should never use the IIf (Immediate If) statement. They say that both options are run whether they are needed or not. The result is that execution is slow. They recommend using pure If satements instead; regular Ifs don't this problem. Of...
  7. M

    Converting query to string

    Hi, My previous reply was not complete. See code below: dim strCompany as string dim strSQL as string strSQL = "SELECT * FROM table WHERE Company = " & QUOTES & strCompany & QUOTES This is needed because strCompany is a string. Thanks, Mike
  8. M

    Converting query to string

    Col, Create a constant Public Const QUOTES = """" Then when you need quotation marks all you have to do is insert & QUOTES & instead of putting in quotation marks. It works for me. It's also cleaner looking. Mike
  9. M

    How can I display a FileOpen dialog box from a MS-Access form?

    Buy the book "Access 2000 Developers Handbook". The accompanying CD contains a class that can be used by anyone with Access. I just used it and it works very well. The Common Dialog Box Control is problematic. It does not come with Access except for the developer version. Besides the books...
  10. M

    Requerying a combo box to EXCLUDE previous selections

    Mike, You need to create a Cartesian query of all the possible combos of selectors and selected items. Feed this into another query where you do a left join on these two fields and include a field that will be null when a record in the Cartesian query is not also in the query that shows the...
  11. M

    Popup Form from a Subform

    Hi, I have a form containing two fields that have buttons to bring up in popup forms the detail data behind each of them - ContactID and CompanyID. If I change the data within the ContactID popup form, the new data is reflected in the calling form's ContactID field. The same is true for the...
  12. M

    How do I Execute buttons when I want them to????

    Wolf, Send me your example. mangel@angel-star.com Mike
  13. M

    File name from full path

    Hi, This is not a question. Today I discovered a very valuable function. This function will take ANY full path - I don't care how many subdirectories are involved - and in one fell swoop will give you the file name. The function is one of the functions supplied by VBA. It is extremely...
  14. M

    Dlookup's Please help

    Please elucidate. I'm not sure what you are trying to do.
  15. M

    How do I Execute buttons when I want them to????

    Hi Wolf, I make my Popup forms first. Then, when I design a form that will call them, I use the command button wizard. The code that the wizard creates works without modication in the GotFocus event. It's a simple cut and paste. I just tested it out. Mike
  16. M

    A Recipe for Good Form Design

    Thanks Liv. And the stupid thing is I have his book.
  17. M

    Prevent Duplicate Values

    Jerry, Why don't you send me a copy of your database. mangel@angel-star.com Mike
  18. M

    Prevent Duplicate Values

    Jerry, Try this. Create a select query that links the table containing the trucks' itinerary data to the table that contains all the possibilities for the combobox. Modify the link so that you so that the resultset of the query includes only the options that have not already been stored in...
  19. M

    How do I Execute buttons when I want them to????

    Try copying the code in the button's Click event to the button's GotFocus event.
  20. M

    Prevent Duplicate Values

    Please elucidate. Do you mean that if selection A was used for the first record, that you don't want the user to select A for the second record?
Back
Top Bottom