Search results

  1. U

    Error 91: Object variable or With block variable not set

    Hi, Here's from Help. You could do something like this. CreateQueryDef Method, OpenRecordset Method, and SQL Property Example (Client/Server) This example uses the CreateQueryDef and OpenRecordset methods and the SQL property to query the table of titles in the Microsoft SQL Server sample...
  2. U

    Filling listbox from VBA

    Hi Gareth, That property is not in the standard listbox. It is avialable in VB6 and 2005 but not Access. If you want to use AddItem, it available in one of the ActiveX (MicroSoft Windows Common Controls-2 6.0 (SP4) or MicroSoft Windows Common Controls 6.0 (SP4) where you can use it. If you...
  3. U

    Invalid Use of Null

    So, you’re saying that the combo boxes must be fill with data, right? And if the User selects a customer and this customer has no record in the Facility. The “Facility Info” form will popup and ask the User to input this customer into the “Facility” Table with the information matching the...
  4. U

    Invalid Use of Null

    But, that’s not what you said in your first post… It is not clear of what you’re trying to do. Did your code work? DoCmd.OpenForm stDocCust, , , Forms!Customers![Customers-CustName] = Me.CustCmbo_Customers Or you’re trying to insert a new record with the “CustCmbo_Customers” into the...
  5. U

    Delete SQL not working?

    When you said can’t delete, is the table link to another table? Like cascade deletes…. this will prevent you from deleting this record. You’ll have to delete it thru your primary table. (Enforce Referential Integerity) What was the option setting on the “Action queries”?
  6. U

    Delete SQL not working?

    Ah! i see what you mean now. It is possible that in your Access setup option, you may have uncheck the confirm message else you may need to compact and repair your database. In your previous SQL...... DELETE pupils.*, pupils.[Pupil ID] FROM pupils WHERE (((pupils.[Pupil...
  7. U

    Invalid Use of Null

    ‘First condition – open customer form only If Not IsNull(Me.CustCmbo_Customers) And IsNull(Me.CustCmbo_Facilities) Then ‘open the form Customer ‘second condition – open facility if both not null ElseIf Not IsNull(Me.CustCmbo_Customers) And Not IsNull(Me.CustCmbo_Facilities) Then ‘open the form...
  8. U

    Delete SQL not working?

    No, never seen or heard that Access can view a record with a delete query, but that would be nice. What version are you using, A2007 or beta Version 13?
  9. U

    Question about dependent comboboxes

    What a mess! These aren’t minor problems. I have modified the table and created new forms. Take a look at the attached. You have used the lookup table “customers” to join the “Orders” table, that’s incorrect method. If you want to do that, create a new table “OrdersCustomer” with the “OrderID”...
  10. U

    Question about dependent comboboxes

    Hi, I am not sure that this will work for you. I suggest you use the on change event of the combo box like……….. Private Sub Combo1_Change() ‘Requery the form Me.Requery ‘change the rowsource to filter current combo box Me.Combo1.RowSource = "select * from tblErmax where mark like '" &...
  11. U

    Open Arguments (OpenArgs)

    If the error line stop here. What is the Datatype for "IDNO"? You may need single quote if it is text.
  12. U

    anything wrong with this sql

    No, refer to previous post on the ampersand string concatenation. You still can leave the “Notes” field there, but you’ll have to input a blank field like…. 'Recieved','True', ‘ ‘);" You’ll have to leave a blank space between the two single quotes for it to work. Hopefully is a typo. You...
  13. U

    anything wrong with this sql

    I don't how you can resolve the problem without removing the last comma. With the comma, I can receive an error in Access in both the QBE and VB. Run-Time error '3134': Syntax error in INSERT INTO statement. Have you compact and repair the database? I don't why the run-time error does not...
  14. U

    anything wrong with this sql

    Hi, You don't need the comma if you want a blank field. If you'll observe the string concatenation & "','Recieved','True','' Your result is ','Recieved','True', with the last comma showing up. PS - Just use 4 fields only if the Column "Notes" is blank.
  15. U

    anything wrong with this sql

    hi, However, that was an incorrect SQL syntax, you'll need to remove that comma. Jet, i think is attempting to insert another blank field to somewhere into your table but it does not know where. You have declared 5 field but 4 field for inserting. Is the last one a blank?
  16. U

    anything wrong with this sql

    Hi, Have you tried to remove the last comma? 'Recieved','True','');" To 'Recieved','True''');"
  17. U

    Problem reading info from a form's property

    Well Bob,.....perhaps we are in a different brain wave length. Yes, your right. You still can access to the form's properties. It's just maybe we need to define/create the object first before changing the object value just like the Table Description property. The object is there in the table...
  18. U

    Problem reading info from a form's property

    Hi Bob, Rather than to say "Not true", Have you created a sample of a blank Form? I have created a blank form, no controls, nothing at all. Just save the form as "Form1" or what ever. Before you closed the form, note of the form's properties "Has Module" it is by default set to "No". Do not...
  19. U

    Problem reading info from a form's property

    Hi gizmo, If the Form's property "Has Module" is set to "No", you not be able to access it's property. This setting is automatic, that is, when ever you key in a line of code, it will automatically set the property to "Yes". If you have any code behind the Form's module and by changing it to...
  20. U

    [Screen].[Activeform]![txtcontrol] in Criteria

    Hi, Yes, I wanted to suggest using that "Forms![frmName]![cntrlName]" on your queries. But you said that any Form could be the Active Form and the Query needs to refer to that Active Form and if "Forms![frmName]![cntrlName]" was not the Active Form, the Query will not work correctly (meaning...
Back
Top Bottom