Search results

  1. D

    use parameter with action query

    Hi, I have a complex action query that I need to run several times, varying a parameter in the where clause each time. The way I've always done this in the past is to just copy the whole sql string into my code, edit via code as necessary, and run it via db.execute. This works fine. However, it...
  2. D

    Prevent subform from updating if main form data is invalid

    Yup, that's it. At any rate, I've found another approach that I think will work for me. If I use basically my original code but use Me.Undo instead of FailureBarCode.Undo, then the subform fails to update (which is what I want). I was reluctant to do this because FailureBarCode was the last of...
  3. D

    Prevent subform from updating if main form data is invalid

    Ok, I'm finally getting back to working on this. Rural Guy, many thanks for your input. However, I still can't get it to work. I tried the method above, but now I'm getting 1. My custom error message ("barcode has already been used") followed by, on exiting the Before_Update event: 2. "The...
  4. D

    Prevent subform from updating if main form data is invalid

    I tried putting the code in the beforeupdate event of me.failurebarcode. The results were the same.
  5. D

    Prevent subform from updating if main form data is invalid

    I have the following in the main form's form_beforeupdate event: If IsNull(DLookup("failurebarcode", "failurebarcodes", "Failurebarcode='" & Me.FailureBarCode & "'")) Then Exit Sub MsgBox "Failure Barcode " & Me.FailureBarCode & " has already been used. Please try again." Cancel = True...
  6. D

    Prevent subform from updating if main form data is invalid

    PS -- I know I can do this by using me.undo, but this undoes all the other info the user has entered in other fields. Not very friendly, when the only problem is the barcode field. But using barcode.undo on a new record doesn't seem to work.
  7. D

    Prevent subform from updating if main form data is invalid

    Hi, Mainform and Subform are linked on field "barcode". Barcode is the primary key for the table that Mainform is based on. When user is entering a new record, I have the BeforeUpdate event of Mainform.barcode set to check to see if the barcode already exists in the table, and if so, to give...
  8. D

    Slow transaction on terminal server

    It's an access backend, and gets compacted and repaired every night.
  9. D

    Slow transaction on terminal server

    IT says everything in the network looks normal. Plus, I'm not seeing a problem with other applications. Last night, out of other ideas, I archived a bunch of older data from the tables that the queries were accessing. This morning, everything seems to have run normally. So, my theory is that...
  10. D

    Slow transaction on terminal server

    I have a couple of update queries nested within a transaction. These have been in place for several years, running every day. Normally takes about 3 minutes to run. Normally run on terminal server using Citrix. About a week ago, this stuff started taking anywhere from 30 minutes to more than an...
  11. D

    Split db and relationships

    No, the relationships in your BE will still be active for your FE. If you open the relationship window in the FE you should, I think, still see the relationships you set up in your BE. You cannot, however, set relationships between tables in two different DB files.
  12. D

    More Function Joy

    You are treating "2005" and "45" as strings. Perhaps they are really numbers? In which case, leave off the quote marks.
  13. D

    Make Table with WHERE clause - HELP!

    I think Access is probably reading "myint" as text. Instead, try Myint = Forms![emailopenonedoctor]![Combo52].Value ' the box that the user uses to select the resource number strSQL = "SELECT [doctoremail].RESOURCE, [doctoremail].MRN INTO [Tbl_AttachPatients] FROM [doctoremail] WHERE...
  14. D

    Function error

    Thanks Pat! You are so good!
  15. D

    Function error

    Hi, I want to do some last-minute calculations to format a field in my report. The field in question is used in detail section of the report, and then summed in the header, like so: Header: =sum([Stagestd]/24) Detail: =[stagestd]/24 The header section works fine, but all the records in the...
  16. D

    Auto Delete Records?

    You are very welcome...Thanks for letting me know!
  17. D

    Auto Delete Records?

    To create a delete query: When designing your query, just select "delete query" from the query menu. For more info, see access help. To make the query run in response to an event: If you are totally unfamiliar with using events, you will need to read up on using events, decide what event is...
  18. D

    Show only unused data in combo box

    Rowsource for the combobox would be something like: SELECT SCTEMP.SubCat FROM SCTEMP LEFT JOIN RSTEMP ON SCTEMP.SubCat = RSTEMP.SubCat WHERE (((RSTEMP.SubCat) Is Null)); where SCTEMP contains all your possible subcategories, and RSTemp is the recordset you're adding records to.
  19. D

    Show only unused data in combo box

    Seems like this would work: 1. Set the rowsource for the subcategory combobox to a query that includes only values not already added to the underlying recordset. (You would need to have a table with all the allowable subcategories(1,2,3,4 etc.) to compare to the recordset you're entering into)...
  20. D

    Story

    When he got
Back
Top Bottom