Search results

  1. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    With the following code in the BeforeUpdate of the subform CAD_Log_DispF, that subform acts correctly. Private Sub Form_BeforeUpdate(Cancel As Integer) Me.EmployeeID = DLookup("EmployeeID", "LocalUserT") If IsNull([EntryDateTime]) Then [EntryDateTime] = Now() End If...
  2. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    This is how I made that table I believe you are referring to as the "action table".
  3. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I appreciate the time you are taking to try to help me with this, but I just need someone to please tell me step by step what I need to do to achieve what I am wanting to achieve using the table names, the field names and the form controls. If Code, what is the code and where does it go. If a...
  4. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I appreciate the time you took to explain all that. I just need someone to please tell me step by step what I need to do to achieve what I am wanting to achieve using the table names, the field names and the form controls. If Code, what is the code and where does it go. If a JOIN, what field...
  5. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I have a table called DispActionT, where I put an ActionFlg field as you suggested. The default value is nothing. The in table CADLogT, I added In the subform frmCAD-Log, the control UnitAvailable is accurate based on the CASE ladder I put in the forms BEFORE UPDATE event. Private...
  6. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    Sorry, but at my knowledge level of VBA that is not any help. :(
  7. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I took the two "" cases out. The CASE ladder is now in the AFTER UPDATE action of the form, as I believe Pat recommended. Private Sub Form_AfterUpdate() Dim strUnitAvail As Integer strUnitAvail = Me.ActionID.Value Select Case Action Case Is = 1: UnitAvailable = 0...
  8. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I chose to get away from the Yes/No and make the ActionFlg a 1 or 0 because a couple of the Actions I don't want any change in the unit's availability, ie... if the N, it simply means a Note Was Added. I can work with the 1 or 0 easier I think.
  9. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    Thank you plog. I wanted to leave the primary key as it "came out of the box" so to speak. In the related field in a related table I us ID_(the name of the related table). That seems to make it easier for me... but just a preference I guess.
  10. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    In regards to "you would use a left join to the Actions table in this subform's RecordSource and select the ActionFlg... I'm confused with that one. How is doing a LEFT JOIN between the Actions table and the subform going to change the value in the parent form's record source (TourT)...
  11. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    Thanks Pat, First off, let me say that I took your advise, along with everyone else's and restructured all my tables to only have the Access generated ID. I eliminated the second field which I had been using to link tables so I should not have that procedure any longer to update the second...
  12. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    Sorry, this is the whole code. Private Sub Form_AfterUpdate() Dim strYesNo As Integer strYesNo = Me.Action.Value Select Case Action Case Is = 1: UnitAvailable = False Case Is = 2: UnitAvailable = False Case Is = 3: UnitAvailable = False Case Is = 5...
  13. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    Thank you for the reply. The TourT table is not hidden in any part of the subform. I amended the Select Case code as you suggested and put it in the subform's AfterUpdate event. In your suggestion, you put <<put unit number here>>. Is that where I would put the value of the combo box from...
  14. regnewby2465

    Change YesNo Value in field in Tbl1 based on value in control an active form bound to Tbl2

    I have a table named TourT with a YesNo field named UnitAvailable. I have a form named CAD_Log_DispF with source table CADLogT. I placed the Select Case code in the BeforeUpdate action of the CAD_Log_DispF form. As you see it simply shows the Unit available or not based on the value...
  15. regnewby2465

    Solved Copy the Primary Key [ID] and Place It In a Different Control in Same Form

    Well you were right again.... using If IsNull(Me.ID_Activity) and Not IsNull(Me.ID) Then Me.ID_Activity = ID End If in the AfterUpdate, the form locked in the Edit mode. I guess to move past this issue I will just use the DMax and increment +1. We tried. I am interested in the Citrix...
  16. regnewby2465

    Solved Copy the Primary Key [ID] and Place It In a Different Control in Same Form

    No, the operator really only needs to see the ID_Activity after it is saved. Where would I put the if Me.Dirty statement, and where would I put the update syntax... I am assuming maybe BeforeUpdate event of form?
  17. regnewby2465

    Solved Copy the Primary Key [ID] and Place It In a Different Control in Same Form

    If there is no simple way through VBA code to copy the Sharepoint generated ID to the ID_Activity, then I will just use the DMax and hope that now two people hit the save button at the same time.
  18. regnewby2465

    Solved Copy the Primary Key [ID] and Place It In a Different Control in Same Form

    Disregard last.... I found the syntax. Thanks for the suggestion.
  19. regnewby2465

    Solved Copy the Primary Key [ID] and Place It In a Different Control in Same Form

    If I was going to go with that rationale, I could do a DMax() +1 on the ID_Activity field and not have to involve the Sharepoint generated ID at all. I will basically be ignoring the Sharepoint generated ID. What is the syntax for the DMax and where would I put it? And I would only want it to...
Back
Top Bottom