Search results

  1. S

    new record

    Recordset.AddNew
  2. S

    Matching Table Data

    The answer is DLookup. If DLookup("[Password]", "Employees", "[EmployeeID] = " & Me.EmployeeID) = Me.txtPassword Then 'Open the next form Else MsgBox "You have entered an incorrect password.", vbOKOnly, "Incorrect Password" End If I have assumed that the field on the form where the user enters...
  3. S

    OLE Automation and Word Custom Document Properties (Access XP)

    Go to design of any code module. Click the Tools menu and select References. Uncheck reference to Microsoft Word 8.0 Object Library and check the Microsoft Word 10 Object Library reference. Should fix your problem. [This message has been edited by scottfarcus (edited 05-23-2002).]
  4. S

    photos

    1) Add the button to run code (I'll call it cmdPicture) 2) Add Microsoft Common Dialog control (find it in the ActiveX (More Controls) button on the toolbar - I'll call it cmdlgPicture) 3) In the click event of cmdPicture, (assuming the ole field is called olePicture) enter...
  5. S

    Removing Access Delete Confirmation

    docmd.setwarnings(false) DoCmd.RunSQL "DELETE FROM tblSelectedFields " _ & " WHERE [SelectedField]= '" & Me![lstSelectedFields] & "'AND [MasterProjectID]= [cmbProject]" docmd.setwarnings(true)
  6. S

    After Command Button, move to certain field

    Private Sub dup_Click() On Error GoTo Err_dup_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append PartNumber.SetFocus Exit_dup_Click: Exit Sub...
  7. S

    Saving data to a table

    In the OnClick event of the button, place the following code... 'Where tblField is the table to which you are appending and FieldName is the name of the field in tblField DoCmd.SetWarnings(False) DoCmd.RunSQL("INSERT INTO tblField (FieldName) VALUES ('" & lstAvailableFields & "')")...
  8. S

    Finding path which working currently mdb

    The code I provided will remove the database name and provide you with ONLY the directory structure. bob's will include the db name at the end.
  9. S

    Finding path which working currently mdb

    Dim db As DAO.Database Dim strPath As String Dim intCharacter As Integer Set db = CurrentDb strPath = db.Name intCharacter = InStrRev(strPath, "\") strPath = Left(strPath, intCharacter) 'Use this code block to retrieve the path or the current database.
  10. S

    Parameter Forms

    fordy, if you want to email me at access_junkie@hotmail.com, I will reply with a sample of what you are trying to do. Scott
  11. S

    How to update text box after check box is selected

    You would use the click event of the check box. Enter the following code in the procedure... If Destroyed = True Then Me.[Storage Area 1] = "" Me.[Storage Area 2] = "" Me.[Storage Area 3] = "" Me.[Storage Area 4] = "" End If
  12. S

    HEEEELP!!!!

    DoCmd.RunSQL("DELETE * FROM tblBlah WHERE Blah = Blah") is one way to do it. (VBA) In VB... Use the execute method of the connection... Dim cn as connection Set cn = [Some connection string] with cn .execute("DELETE * FROM tblBlah WHERE Blah = Blah") end with [This message has been...
  13. S

    Access form in word

    Use VBA and automation. You will need to create an instance of Access and use the OpenDatabase method of that instance to open the existing database. Once you have set the instance to a particular database and opened it, you can control in from within Word using VBA. If you need an example...
  14. S

    urecognized database format

    Humberto, First, check out www.VBForums.com. It may be a little more the type of support you're looking for. How did you set up the connection in your data environment? For an Access 2K database, you should be using the Jet 4.0 provider. You may have accidentally used the 3.51 Jet which is...
  15. S

    Message box icons, eg, critical X, info i, exclamation!

    MsgBox "Blah Blah Blah", vbInformation I only use the parentheses if I want to do something with the return value of the msgbox... If msgbox("BlahBlahBlah", vbInformation+vbYesNo) = vbYes then 'Do something Else 'Do something entirely different endif AND you need to eliminate the commas after...
  16. S

    Update value on form dependent upon which form subform was opened from..

    Create an unbound text box on FormB and name it txtOpenedFrom. In the click event of the button on each from that opens FormB, set the value of FormB!txtOpenedFrom equal to the form name of the calling form. For example, if Command1 on FormA opens FormB... Sub Command1_Click() docmd.openform...
  17. S

    open form with related details when double clickin a selected item in listbox

    Email me at access_junkie@hotmail.com so I can send you an example. Scott [This message has been edited by scottfarcus (edited 04-04-2002).]
  18. S

    AccessXP and WindowsXP

    I have an XP database that performs a Word mail merge using automation. The merge uses a common text file (stored on the root C: drive) as the data source for the template. This merge works perfectly on any box running anything other than Windows XP. When you try to execute the following line...
  19. S

    Close form

    Look for help on "dirty". Ex: If Me.Dirty Then If Msgbox("Save Changes?", vbYesNo, "Save?") = vbYes Then DoCmd.Close Else Me.Undo DoCmd.Close End If Else DoCmd.Close End If [This message has been edited by scottfarcus (edited 03-21-2002).]
  20. S

    auto fit to screen forms

    Anauz - You would be a life saver if you sent that code my way. THANKS! access_junkie@hotmail.com Scott
Back
Top Bottom