Search results

  1. C

    multi-column listbox

    hello, I have a form with a listbox containing columns"ID", "Name", "Surname" User can select multiple rows. Upon clicking OK button, selected rows are inserted into a table. Important part of code behind OK button: For Each i In Combo6.ItemsSelected rst.AddNew rst![ID] =...
  2. C

    Append qry also updating

    Solved So, I finally found it - it had nothing to do with the button, it was the "Control Source" property set on the form textboxes - dumbest mistake ever, I'm gonna go nail my head to a subway track.
  3. C

    Append qry also updating

    As I said, I have experimented with both query and recodrset solution with same result, but here's the code behind the button anyway: Dim dbs As DAO.Database Dim rst As DAO.Recordset Set dbs = CurrentDb Set rst = dbs.OpenRecordset("SetQuestions") AddRecord: rst.AddNew...
  4. C

    Append qry also updating

    Hello, I have a button on my form that inserts a record into a table, filled with the contents of textboxes on that form. It works, but it is also does something strange - more oten than not it also updates one of the existing records with the data from the form (it only updates one of the...
  5. C

    Avoiding duplicate records

    Hello, I have the following piece of code that inserts records into a table using recordsets. It works fine, but i want it to check if the combination of field "Question Number" and "App ID" already exists in my table, and if it does, then skip the row and continue with next one. Set rst =...
  6. C

    If function

    Works, thanks again
  7. C

    If function

    Hello, I've created the following code (not working) testSQL= "SELECT Product FROM ...." If IsNull(DoCmd.RunSQL(testSQL)) Then ... When my SELECT statement returns no rows, I want my If code to be executed. But the syntax above is incorrect. How do I fix it? Thanks in advance
  8. C

    Basic VBA task

    Hello, I'm new to VBA and i need some help with this. I want VBA to scan a certain table column and insert the highest value it finds there into a variable. How do I do that? Any help would be greatly appr.ed
  9. C

    Subdatasheets

    Thx Thx, that works. It isn't exactly what i had in mind, but id does the job.
  10. C

    nested loop query

    Taking it back, problem solved by using ultra-simple INSERT INTO...SELECT I'm dumb ------ Hi, I have the following problem: I need to loop INSERT INTO query the following way: I have columns "WeekNumber" and "Weekday" Now I need to pre-create rows for a whole year. It should look this way...
  11. C

    Subdatasheets

    Say there is a record called "Nokia 6330" in A. In B, there is a set of questions ("Do you like the color of the phone", "Are you satisfied with battery life", and so on) - about 350 of them, with many colums for answers. It would be impractical to have 350 columns in A, espetially with column...
  12. C

    Subdatasheets

    Hello, I'm sorry if this has been already discussed but I've been searching without result. I have a table "A", with table "B" in it as a subdatasheet. Now when i insert a new row into "A", i need a new copy of the table "B" to be created, meaning every row in "A" would have it's private copy...
Back
Top Bottom