Search results

  1. D

    Problem using recordset and Findfirst

    I am trying to use a form to find a record and open a second form to allow editing that record. But, I also want to load the other records in the table so the users can scroll through them. Here's my setup: I have two unbound controls, Job number and NCR Number on the first form. The data...
  2. D

    Trouble with update query

    it's all working the way I want it to now - many, many thanks to everyone that provided input. As always, I learned a lot from this exchange. Let's call this one solved! Here's how my final code looks, in case it can help anybody in the future. Private Sub CmdNewNCR_Click() Dim lngNCR As...
  3. D

    Trouble with update query

    Yes - I know about the field names. l mentioned in the original post that I inherited these funky field names. Changing them at this point would be a monumental task. So, the update query is working now but my If statement to check for dupes is failing every time. It finds dupes where there...
  4. D

    Trouble with update query

    Yes, I know. I mentioned in the original post that I inherited this message with the funky field names. Thanks for your help - I knew I had missed something simple.
  5. D

    Trouble with update query

    I fixed the Dcount problem - my syntax was all funky and my form name was not right. So here's the version of code that actually works. Private Sub CmdNewNCR_Click() Dim lngNCR As Long lngNCR = DMax("[NCR#]", "[Non Conformance]") ' Debug.Print lngNCR If (([Forms]![Input...
  6. D

    Trouble with update query

    Sorry I have not responded to this for so long. Life is crazy. Thanks to everyone who weighed in on this, the query is working now. However, I forgot something important - I need to check for duplicates. I added a DCount and another msgbox and modified the code to this: Private Sub...
  7. D

    Trouble with update query

    The debugger lands right here and highlights this: Private Sub CmdContinue_Click() The only thing in that subroutine is what I posted last time. I'm kind of at a loss.
  8. D

    Trouble with update query

    That superfluous WHERE clause was brought to you by the Department of Redundancy Department. Any, I tried this and I'm getting a syntax error. Here's the code I entered: Private Sub CmdContinue_Click() CurrentDb.Execute "UPDATE [Job Info] INNER JOIN [Input] ON [Job Info].[Job#] =...
  9. D

    Trouble with update query

    I have a couple of questions, please. First, I am trying to use an update query to update a field in a second table. Here's the setup: New record is being added to the Input table - the job number field is populated and when the "Job Complete" checkbox is clicked, the Update Job Status form...
  10. D

    Insert record into different table after update

    Yes - I did check the sample db. It was indeed working the way I wanted. I found the problem causing the run time error - the field name in the table is NCR# without a space. Once I removed the space, it worked flawlessly. I am grateful for the help - I learn so much from the people on this...
  11. D

    Insert record into different table after update

    yes, Accept/Recheck is a text field - the control is a combo box. Like I said, I inherited this system. Anyway, I did make the terminology changes but I'm still getting this runtime error. Run time error 2471 The expression you entered as a query parameter produced this error '[NCR]'. The...
  12. D

    Insert record into different table after update

    I removed the verification step just to simplify things until I get this working and used your exact code in the After Update property. Dim lngNCR As Long lngNCR = DMax("[NCR #]", "[Non Conformance]") ' Debug.Print lngNCR If Me.Accept_Recheck = True Then...
  13. D

    Insert record into different table after update

    Thanks for the help but I ran into a problem. To verify that the user does indeed intend to create the new NCR, I put a verification dialog in the After Update property of the Accept/Recheck control (which is a combobox). Then, I put this code in the On Click property of the Continue button on...
  14. D

    Insert record into different table after update

    Yes, I am aware that special characters or spaces should not be used in table or field names. This system was created years ago by someone else and I have been tasked with updating and fixing some problems. I can't change the data type to autonumber since this is a production database and...
  15. D

    Insert record into different table after update

    I am trying to update one table depending on the value entered on a form and could use some insight from those that know more than I do. Here's the scenario: Input table: ID - auto number Accept/Recheck field - Quality control evaluation status There are other fields in this table but I just...
  16. D

    Field Requirements based on conditional visibility

    That works great! I knew it was something simple that I was overlooking. Thanks very much.
  17. D

    Field Requirements based on conditional visibility

    I certainly will. I just know I have overlooked something. But it has been a long day and I believe I'm finished thinking until tomorrow. :D I'll look at it then. Thank you for your help.
  18. D

    Field Requirements based on conditional visibility

    I'm setting the tag to ? in the Control property for each field on the form.
  19. D

    Field Requirements based on conditional visibility

    I have a form on which certain fields are only visible when the correct value is chosen in the combo box. Here is the code I have in the After Update property for the combo box - it is working fine. Private Sub Issue_Type_AfterUpdate() If Me.[Issue Type] = "Bindery" Then Me.[Roll...
  20. D

    Dlookup is driving me crazy

    I got it working! I ended up with this: =Nz(DLookUp("[Input Query1]![NCR#]","Input Query1","ID=" & [Forms]![input form]![id]),"None") I just needed to pull the id from the form, instead of the query, to get the current record. Thanks to everyone for helping me figure this out.
Back
Top Bottom