Search results

  1. S

    Right Function

    Thanks guys. All works fine. Bob you a genious
  2. S

    VBA Old Value > New Value

    Hi All I have a table called "table 1". It has two column in it 1. ID 2. Name All I want is if someone changes a field in "table1" then to bring back two message boxes stating the old value and new value. I believe this can be done with the OriginalValues property? Can anyone help...
  3. S

    Right Function

    the variable r contains 'WRKCHISWELZ5504' all i want is the last 4 digits '5504' msgbox r displays 'WRKCHISWELZ5504' however, msgbox Right(r,4) displays nothing i.e. blank I cant work it out!!!
  4. S

    Right Function

    Hi All It wont give me the RIGHT() Function for my variable ‘r’. Please cope and paste the code and you will see. Any help appreciated Thanks Sub mac1() Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim r As String cn.Provider =...
  5. S

    VBA Looping through objects on Form

    Fantastic Guys, it works perfect now! Thanks for the help!
  6. S

    Dlookup

    Hi All I cant get this DLOOPUP to Work. I have tried a lot, even posting threads before this. It comes up with a message ‘Run Time error 2001: You cancelled the repvious operation’ Here is a quick glimpse at the DLookup, DLookup("[Name]", "[Asset Register]", "RIGHT([Asset Number],4)="...
  7. S

    VBA Please HELP!

    Hi All I really need your help. I have table1 that logs any changes made in Table 2. So far it logs the computer name of the individual who changed a field and the time. What I desperately need is to have one further field to log. I need to log the field within table two that was changed...
  8. S

    VBA Looping through objects on Form

    Hi It still doesnt work I use the following code Dim ctrl As Control For Each ctrl In frmAPI_DTP.Controls MsgBox (ctrl.Name) Next Ive even tried using the following code without any luck Dim ctrl As Control For Each ctrl In CurrentProject.AllForms.Item(0).Control MsgBox (ctrl.Name)...
  9. S

    Record Set

    Thanks, but lets say I open the table manually and highlight row 3 for example. Is there a way of VBA telling me that i have row 3 highlighted?
  10. S

    Record Set

    Hi All Can someone tell me how i can determine the row which my table is current on. i.e. Sub Updatefields() Set cn = CurrentProject.Connection Set rs = New ADODB.Recordset rs.Open "Table1", cn End Sub
  11. S

    VBA Looping through objects on Form

    it says variable not defined. It then points to the section where it says 'Form'
  12. S

    VBA Looping through objects on Form

    Hi This doesnt work. it brings back a message saying 'Object or class does not support the set of events'
  13. S

    How To Open Excel From Access

    Shell ("Excel.exe")
  14. S

    VBA Looping through objects on Form

    Hi All I have a form called Form1. I have several different objects on it i.e. buttons, textboxes, comoboxes etc. All i want is a piece of code that runs through all the objects on Form1 and gives me their names. Thanks
  15. S

    Vba Dlookup

    Hi Heres the code Dim db As DAO.Database Dim rst As DAO.Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Table1") rst.AddNew rst!Date = Now() rst!Name = DLookup("computer", "table2", "name = 'shamal'") rst.Update
  16. S

    Vba Dlookup

    Hi All I have a problem with the DLOOKUP in VBA rst!Name = DLookup("[Name]", "[Asset Register]", "RIGHT([Asset Number],4)= RIGHT(Tables!Table1![Computer],4)") It produces this error "You canceled the previous operation." rst!Name is my recordset. Please Help
  17. S

    VBA Msgbox after update

    The on dirty doesnt work either. The code is simple. its: Private Sub Form_AfterUpdate() MsgBox "You changed a record!" End Sub
  18. S

    VBA Msgbox after update

    Hi All My question actually has a bigger picture to it but i want to make it simple. I have a form. I have a table as the data source to the form. I want a message box to pop up if the user makes a change to a record. Thats it! However i cant get it to work. I use the form after update...
  19. S

    Cant connect to SQL Server

    thanks .
  20. S

    DAO vs ADO

    Hi all Can someone tell me the benefit of ADO? Im using DAO to connect to the object in my database and other databases on my C drive, but why use ADO rather than DAO? Also what is ADOBD? Thanks
Back
Top Bottom