Search results

  1. H

    Copy values of Main and Subform (only main form working)

    Okay, so I changed the name of the textbox to txtSTOTActComments, and put that in place of .txtID. rs!ID is rs!STOTActComments. After doing so I get the error 440 (The value you entered isn't valid for this field).
  2. H

    Copy values of Main and Subform (only main form working)

    If I am understanding correctly, the .txtID is the caption name "STOTActComments", also the name of the field in the table. The rs!ID is the name of the field in the table, "Step Oil Tools Activity", the control source for that field. I am assuming that I am not understanding the rs!ID part...
  3. H

    Copy values of Main and Subform (only main form working)

    I placed the name of the control source as rs!ID and the name of the field as rs.txtID, but I am getting an error 3265 (Item not found in this collection). The code now looks like this: Dim rs As DAO.Recordset Set rs = Me.fsubSTOTAct.Form.RecordsetClone rs.Bookmark =...
  4. H

    Copy values of Main and Subform (only main form working)

    Thanks vbaInet! I knew there would be something like this to use. I was trying Allen Browne's method, but this seems simpler. I have replaced the bits, but I am having a problem for the subform values. I don't believe I am entering them correctly. What would .txtID be in my subform? And what...
  5. H

    DCount For Date And UserId, Data Type Mismatch...

    Thank you for all the help! I went about it a bit differently with a DLookup and this worked: If DLookup("[UserID]", "tblGenSum", "[UserID]= '" & Me.UserID & "' And [Days]= #" & Me.txtDate & "#") Then MsgBox "Day already in use." Else MsgBox "Day not in use." End If What I had failed...
  6. H

    DCount For Date And UserId, Data Type Mismatch...

    One of the problems was that the UserID is a string, so I changed the code accordingly. However, for whatever reason, Access still sees available dates as used ones...
  7. H

    DCount For Date And UserId, Data Type Mismatch...

    Thanks Bob. For someone reason though, I still get a data type mismatch. If I use just the UserID portion, I still get the error. If I use the Days by itself it will assume that the day is available even when it's not...
  8. H

    DCount For Date And UserId, Data Type Mismatch...

    I am trying to use the following code to check if a UserID and Date have been used together: If DCount("*", "tblGenSum", "[UserID]=" & Me.UserID & " And [Days]=" & Me.Days) > 0 Then MsgBox "Day already used." End If However, I continue to get a data type mismatch. The UserID is numerical...
  9. H

    Copy values of Main and Subform (only main form working)

    Many of the records will have the same information for many days. Instead of having to write everything over, I am attempting to have a simple method to use the values from a previous date carry over to a new date.
  10. H

    Copy values of Main and Subform (only main form working)

    If I add: Me!fsubSTOTAct.SetFocus Above it, I can set the focus on the subform, however once saved, it merely saves over the current record being displayed instead of saving as a new one...
  11. H

    Copy values of Main and Subform (only main form working)

    I need to copy a main form and subform's values to a new record. I can get the main form to copy its values over with the following code: DoCmd.RunCommand acCmdSelectRecord DoCmd.RunCommand acCmdCopy DoCmd.RunCommand acCmdRecordsGoToNew DoCmd.RunCommand acCmdPasteAppend However, this does not...
  12. H

    Verification of Date and User ID only seems to check Date? Adds extra blank record...

    I did originally use the field's Before Update, so I tried the form, but it to gives me an Access error. I noticed that doing it this way also has my combobox not work anymore for previous dates. It also gives errors for my User ID fields. I can upload a small version of it so you can see what...
  13. H

    Verification of Date and User ID only seems to check Date? Adds extra blank record...

    Thanks for taking a look. The code is in the After Update event. I tried your code in the Before Update but it gives me a run-time error: 3464 "Data type mismatch in criteria expression"
  14. H

    Verification of Date and User ID only seems to check Date? Adds extra blank record...

    I have a piece of code that is meant to check both the Date and User ID to see if the User ID has already used that date. I noticed it doesn't work properly as I attempted to use a date that only a different user had already used, but the code came back with the message it should only show if...
  15. H

    Subform Issues: Can't add Data; Can't verify Data; Can't change to previous Data

    So after creating a unique index, I am able to fill in the subform, however, it still replaces the previous record despite being a different date or other information. I have also got the verification working, but it still creates a blank record without a date despite this. I believe this is...
  16. H

    Subform Issues: Can't add Data; Can't verify Data; Can't change to previous Data

    I just went through normalization, and now I'm going insane from subform mishaps! I've been trying to find and implement solutions for the last 5 days with no luck. The setup: I have uploaded a condensed version of my database. There are two tables, and three forms - one being a subform. You...
  17. H

    2 Subform Problems: 1) Can't Update 2) Connect saved data to one date

    I have a form that has three basic criteria used on all forms from one table: 1) Date 2) UserID 3) ProjectID. I then have a subform that uses data from another table. My first major concern is that I cannot get the subform to be updated. From what I have read it seems like my settings are...
  18. H

    Forms show in Design, but not in Live/Layout View (one form works fine though)

    Wow, I feel pretty dumb right now. Thanks for the help. Worked once I got it in. Now I just need to test it with data.
  19. H

    Forms show in Design, but not in Live/Layout View (one form works fine though)

    Unfortunately, even with other tables added that have relationships with both tables, I still get a blank form. :confused:
  20. H

    Forms show in Design, but not in Live/Layout View (one form works fine though)

    When I get the Form Properties, I only see Record Source, not Row Source. I was using fields wrong, I meant to say combobox, but that is the only time I see Row Source.
Back
Top Bottom