Recent content by Pricey

  1. P

    Open Append Query In Datasheet View With VBA

    Hello I am currently writing some code to run a series of queries. Is it possible to open an Append Query in datasheet view using vba before I append the data to a table? I am using access 07. I am currently trying to use DoCmd.OpenQuery Cheers Andrew
  2. P

    Add New Records With VBA

    Worked Great. Thanks for your help.
  3. P

    Add New Records With VBA

    Thanks for helping me out with this. It is much appreciated. I tried it but it came up with the error message "object variable or With block variable not set". Removing the error trapping it was tripping up on the line. Set rs = rs.OpenRecordset("tblRegister")
  4. P

    Add New Records With VBA

    I will just type it in. IDRegister, IDNHHMeter, Register 101, 50001, 1 102, 50001, 2 103, 50001, 3 104, 50001, 4 105, 50001, 5
  5. P

    Add New Records With VBA

    That table I added didnt work properly. Try again. IDRegisterIDNHHMeterRegister101500011102500012103500013104500014105500015
  6. P

    Add New Records With VBA

    I think it is good I am trying code. I have only been using access for a couple of months and before that I thought excel was the only way. I have a form which adds a new record to a table. On this form there is a unbound text box called txtRegister. Once the primary record is saved I then...
  7. P

    Add New Records With VBA

    I am really not having a good start to posting. Cant believe I hadn't initialised R in my example, it was in my master form. Not sure what my idea is behind 2 loops. I am very new to looping and was trying to copy something out of a book. Removed one of the loops and added the reference to...
  8. P

    Add New Records With VBA

    You are right. When I was trying to get it going using the select case method I forgot to add it back in. Put it in and it still doesnt work. Dim R As Integer Dim i As Integer Do For i = 1 To R Dim rs As ADODB.Recordset On Error GoTo HandleError Set rs = New ADODB.Recordset rs.Open...
  9. P

    Add New Records With VBA

    Hi I am new to this forum and quite new to vba so if someone could help me with this code it would be appreicated. What the code does is add's a new record to a table using the information it gets from a form and that works fine. Below the first code is what I am trying to do. Dim rs...
Back
Top Bottom