Search results

  1. S

    EOF Loop on Subform

    gemma-the-husky, I am looking for that type of behavior, just automated. Think I am asking for to much. I want to check mark box to update my main form with todays date, then update my subform that is located on my main page footer. The subform is located on the footer because both the main and...
  2. S

    EOF Loop on Subform

    JHB, Do you have any suggestions in getting the vba for the recordsetclone to work based on the code i have above?
  3. S

    EOF Loop on Subform

    I'd like to stick with corrected VBA if possile because I want to apply this to another form based on the clicking and unclicking of a check box. I cannot upload a copy of the database at this time. Can you assist with modifiying the VBA from above? I'm confused with you say the...
  4. S

    EOF Loop on Subform

    I may need assistance with the recordsetclone. I tried the following below, but it still only changes the first record. I am beginning to think I have to much fluff in my code at this point. Private Sub Process_AfterUpdate() If Me![Process] = -1 Then Me![Process Date] = date Dim rst As...
  5. S

    EOF Loop on Subform

    I thought the MoveNext command pushed it to the next record in the subform. Any thoughts on what I should add? rst.MoveNext
  6. S

    EOF Loop on Subform

    Still the same results. The [key] is the main PrimaryKey that links the two tables. [DetentionID] is the fk of the [key]. Private Sub Process_AfterUpdate() Dim db As DAO.Database Dim rst As DAO.Recordset If Me![Process] = -1 Then Me![Process Date] = date Set db = CurrentDb Set rst =...
  7. S

    EOF Loop on Subform

    I am experiencing an issue when running a loop on my subform. The code works on the first record, but doesn't move to the second or additional records of the subform, if there is in fact additional records. Below is my current code. Private Sub Process_AfterUpdate() Dim db As DAO.Database...
  8. S

    Compile Error - On Form Current - After splitting database

    Thank you for the reply. After an hour, I saw that my DAO 3.6 Reference was not active.
  9. S

    Compile Error - On Form Current - After splitting database

    Good afternoon, I was wondering if anyone experienced a similar problem after splitting a database. Prior to creating a front and back end, my code worked perfectly. After splitting, I am generating a compile error, highlighting the line Dim dbs As Database. The code basically deletes the...
  10. S

    Listing All Report Objects in List Box - Wish to hide some

    I know this is a few months old, but how do you link the table [tlkpReports] with the actual reports? I remember Mr Larson mentioning this awhile back but I could never figure it out. I like the idea of the yes/no to hide reports. I also would like to display the report description in the list...
  11. S

    E m a i l Invoice from Customer Order Form with Command button

    Try this out. Private Sub Command1_Click() On Error GoTo Err_Command1_Click Dim stReportPathName As String Dim stDocName As String Dim stLinkCriteria As String stReportPathName = "C:\Users\" & Environ("UserName") & "\Desktop\Name you want the file to be-" & Me!ThePrimaryID &...
  12. S

    Delete record from subform, but not from table, and clear _fk text

    My Solution: Private Sub Check265_Click() If MsgBox("Remove selected Property?", vbQuestion + vbYesNo, "Remove Selected Records") = vbNo Then Me.Check265 = "" Else If Me.Check265 = -1 Then Me.Text272 = "" Me.TurnoverTo = "" Me.DateOut = "" Me.PropertyStatus = 2 Me.Check265 = ""...
  13. S

    Delete record from subform, but not from table, and clear _fk text

    I'd like to set the values back to false after the update so i can reuse that record. One thing I just tried that is working is putting the same code I have above in the On_Current event of the subform as well as the On_Click. It executes the specific actions but it gives me the msg box...
  14. S

    Delete record from subform, but not from table, and clear _fk text

    All, I created a screen shot of what is happening. For this example, my subform has three records. I am attempting to "" the _fk values. When I click to run my code, instead changing the values of the last record, it changes the values of the top record. The code does what I want, just not...
  15. S

    Delete record from subform, but not from table, and clear _fk text

    Thank you for the response. I came up with the below as a quick fix. The problem I am facing is that the subform is a continuous form. If I click on the check 265, it removes the top record, not the current selected. Other than that, the code does what I need. Any suggestions on the ability to...
  16. S

    Delete record from subform, but not from table, and clear _fk text

    I have a form with a subform where I review records via a relationship. The subform records belong to a table [tblPropertyDetails] and the main form table [tblPropertyManifest]. The records are pulled from an after update / dlookup code. I would like to delete the record from the subform...
  17. S

    Preventing Duplicating Values With Dlookup

    Thank you for aiding me. I feel like an idiot now after realizing what I was doing! Final product: Private Sub Command8_Click() Dim dbs As Database Set dbs = CurrentDb dbs.Execute ("UPDATE tblPropertyDetails INNER JOIN tblPropertyDetailsDummy ON (tblPropertyDetails.PropertyID =...
  18. S

    Preventing Duplicating Values With Dlookup

    I am still runing into the issue of it only updating one line rather than several. Any other suggestions? Private Sub Command8_Click() Dim dbs As Database Set dbs = CurrentDb dbs.Execute ("UPDATE tblPropertyDetails INNER JOIN tblPropertyDetailsDummy ON (tblPropertyDetails.PropertyID...
  19. S

    Preventing Duplicating Values With Dlookup

    It still doesn't loop the record. It will only take the last entry. UPDATE tblPropertyDetails INNER JOIN tblPropertyDetailsDummy ON (tblPropertyDetails.PropertyID = tblPropertyDetailsDummy.PropertyID) AND (tblPropertyDetails.BagNum = tblPropertyDetailsDummy.BagNum) SET...
  20. S

    Preventing Duplicating Values With Dlookup

    Do I need to rewrite the query or VBA? I tried doing the following vba but received an error: Object Variable or With Block variable not set. Private Sub Command8_Click() Dim dbs As Database Dim rst As Recordset Set rst = dbs.OpenRecordset("UpdateProperty") rst.MoveFirst Do Until...
Back
Top Bottom