Recent content by jesse

  1. J

    setting all formfields in a column to true with vba

    Hi, I have to fill out long word forms regularly and I made a macro to check all checkboxes in a column in a table (see code below). It works fine except when a cell has more than one checkbox, then only the first checkbox in a cell gets checked. The problem in my code is that when I update a...
  2. J

    disable/defer constraint until end of transaction

    Well, I have a lot of constraints. For example, lets say that I have two tables, table1 and table2, and for every row that is added to table1 there should be two rows added to table2 (with some kind of corresponding key). Now I have two constraints, one for a maximum of two rows which is fine...
  3. J

    disable/defer constraint until end of transaction

    Hi, Does anyone know if it is possible to temporarily disable a constraint in access? I know that t-sql does not support "DEFERRABLE INITIALLY DEFERRED" but is there a workaround? (short of removing a constraint and then creating it again afterwrds, I wouldn't like to do that for every...
  4. J

    syntax error in string in query expression '45')

    maybe the space in Descript ion?
  5. J

    Query returning Blank

    There is no way for a query to return either a number of rows (with more than one field) or if there are no rows then return a single zero. Queries return rows, not values. If there are no resulting rows the query returns an empty set. When I look at your query: SELECT Table1.ID...
  6. J

    Query returning Blank

    If you want to know if a query returns 0 records you can use something like EXISTS(<your SELECT query here>) --> returns FALSE if the count=0 or something like SELECT COUNT(*) FROM (<your select query here>) --> returns 0 if the result of your query is an empty set hope it helps.
  7. J

    constraint problem

    Ah, but you did put me on the right track. I have found a solution: CONSTRAINT cstMax_one_correct_answer CHECK(NOT EXISTS(SELECT item_id, answer_correct FROM tbAnswers WHERE answer_correct=true GROUP BY item_id,answer_correct HAVING COUNT(*)>1)); thanks very much!
  8. J

    constraint problem

    thanks very much for thinking along. In response to your questions: I'm more familiar with sql than with the access interface for creating tables and some of the people that are working on my project use sqlite so I'd like to have something that is reasonably portable. I'm using ADO (because I...
  9. J

    Help on Query Problem!!!Urgent!

    I agree totally with what vbaInet says. That being said the problem could also relate to the following. see: http://stackoverflow.com/questions/137082/dont-have-exclusive-access-to-database-and-so-cannot-save-changes
  10. J

    constraint problem

    No, that's not the case. I have a number of check constraints in my database that work just fine. For example the minimum one correct answer constraint on the same table is: CONSTRAINT cstMin_one_correct_answer CHECK(item_id IN(SELECT item_id FROM tbAnswers WHERE answer_correct=true)) that...
  11. J

    Query to show last balance of each customer

    First of all, your database needs some improvements. For example: don't use a name as an id. Try to read a good book about database when you have the time. IN the meantime, the query below will do what you want. SELECT * FROM Customer_Orders WHERE customer_order_date=(SELECT...
  12. J

    constraint problem

    Hi, I have the following table CREATE TABLE tbAnswers (answer_id INTEGER NOT NULL PRIMARY KEY, answer_correct BINARY NOT NULL, answer_position INTEGER NOT NULL, answer_text VARCHAR(150) NOT NULL, item_id INTEGER NOT NULL REFERENCES tbItems(item_id) ON UPDATE CASCADE ON DELETE CASCADE...
  13. J

    Problem with accessing ie DOM from vba

    Oops, forgot to use "set" in "document = IE.document" works perfectly now, thanks a lot!
  14. J

    Problem with accessing ie DOM from vba

    Hi Darbid, thanks for your response. I didn't know about that event. I gave it a try (see code below). However, I still get the same error message "object variable or with block variable not set". Can you see if there is another problem with my code? Sub loginSite() On Error GoTo...
  15. J

    Problem with accessing ie DOM from vba

    Hi, I want to automatically log in to a website to get some information of it to load into my database. Below is an attempt to set the value of two textboxes on a login page. Does any body know why this would give the error: "91: objectvariable or with blockvariable not set"? thanks...
Top Bottom