Recent content by GordonR

  1. G

    Who is corrupting my database?

    Auto session termination Thanks all for taking the time to reply, I intend to post the value of Environ("username") on Form open and remove it on close to prove the point, but I now think it is because the users citrix session is being automatically terminated after a period of inactivity...
  2. G

    Who is corrupting my database?

    Thanks RAK! Gordon
  3. G

    Who is corrupting my database?

    I have a database running on a Citrix server to serve multiple users. It was in Access97 but I recently converted it to Access2002. Since then the database seems to report that it is corrupted quite frequently. I suspect that a user is causing it by powering off without closing down. The problem...
  4. G

    Query output to a text file

    I want to run a query which will also include some expressions made up of html. The idea is that I can use the output of a query to generate an html page that will just require <head> and <body> wrappers. I can create a 'make table' then export it, but is there a way to do it directly from the...
  5. G

    How to report record just inserted?

    Thanks for the reply Rich. The problem is that the form is unbound. Also, I would not expect the acCmdSaveRecord to be valid as the record is actually being created via the SQL INSERT (actually done with an doCmd.OpenQuery). Thanks for helping.
  6. G

    How to report record just inserted?

    I have a subform which shows prices for a given supplier that relate to a product (the mainform). The user clicks on a command button in the subform to create a new order for that supplier/price and the pop-up has a confirm button that when clicked runs an INSERT SQL statement to add the new...
  7. G

    Stock Levels

    I think what I would do here is to have an update query go and do the job of adjusting the stock level on the corresponding product. Hope this helps
  8. G

    Changing recordsource for a form

    Got it at last!! The click event looks like (where ExOrderId is a Public long) ExOrderId = [ID] DoCmd.OpenForm "Review Order" and the On open event for the 'Review Order' form contains Dim SQL As String On Error GoTo Err_Cancel_Click SQL = "SELECT * FROM [Order] WHERE ID = " &...
  9. G

    Changing recordsource for a form

    I have a form whose recordsource is set to SELECT * FROM [Order] which I want to change to a single specific record using while testing) as a click event on another form using: Dim SQL As String SQL = "SELECT * FROM [Order] WHERE ID = 72" Forms![Review Order].RecordSource = SQL DoCmd.OpenForm...
  10. G

    Identify when INSERT query fails

    Hmmm.... how bizarre. I am running Access 2002 on Win Xp Pro, et tu, mon ami?
  11. G

    Identify when INSERT query fails

    Thanks for the reply Mr Mile. However, as setwarnings = false then the err_routine never gets entered - only if the setwarnings = true before the docmd.openquery do I see the msgbox and the error details (as well as all the other warnings!!) Any thoughts?
  12. G

    Identify when INSERT query fails

    I have searched on the forum but am a bit punch drunk by all the information here! I have the following code: Docmd.setwarnings False Docmd.openquery "insertquery" Docmd.setwarnings true However, if the query fails (e.g. violations) then as the warnings are 'off' it just gets ignored. If they...
  13. G

    Deletion event

    Thank you very much for the replies. It was the status that I was looking for all along! So, my code now has a public declaration of a variable that has its value set in the Form_Delete and then used in the Form_AfterDelConfirm as If Status = 0 Then Forms![Product Maintenance]![In Stock] =...
  14. G

    Deletion event

    Think this is driving me nuts! I have attached a bit of code to the ondelete event in an attempt to replace the standard delete actions: Private Sub Form_Delete(Cancel As Integer) Dim Answer As VbMsgBoxResult Dim SQL As String Answer = MsgBox("Are you sure you want to delete...
  15. G

    Combo Box

    Hi! The combox will allow a blank (null value) so just include that in your tests e.g. I use this SQL where clause on my supplier file where the user wants to enquire on all products supplied by a certain supplier, or blank for all with the selection from a combobox: WHERE (((Supplier.[Supplier...
Back
Top Bottom