User Profile
Collapse
-
I am not sure how to retract my question and cancel the post, but perhaps one of the sysops can. -
NeoPa, I am sorry if you took it that way. I am NOT asking anyone to do my work for me, and to just assume that I am and write so in a response for everyone to read, is too not cool. I included as much detail as I could about the structure to help everyone understand exactly what I am needing. I don't expect anyone to write the code for me unless they absolutely want to. I am on this forum to seek guidance and education on how to achieve my objective...Leave a comment:
-
Button to open form where ID=ID, and setfocus on a certain control
I have a form named CAD_CallDispSpl itF with a primarey key as ID in the underlying record source. The form has a command button, btn_addVehicle.
I have another form named frm_CAD_CallerA ndVehicle that has two subforms: frm_CADcaller and frm_CAD_Vehicle s. The subforms are NOT on individual pages. Each subform is linked to the parent form on ID.
Either through VBA or Macro, I need an On-Click event on the btn_addVehicle... -
MNewby replied to If subroutine to get Now() value in date controls on parent form depending on an action on the subformin AccessThank you for the explanation. Hopefully I can avoid that problem in the future. Have a great weekend....alth ough I will be working on this LOLLeave a comment:
-
MNewby replied to If subroutine to get Now() value in date controls on parent form depending on an action on the subformin AccessThank you NeoPa.... I just want to do things the right way and I'm trying to learn how. Again thanks... you're the greatest. Problem solved.Leave a comment:
-
MNewby replied to If subroutine to get Now() value in date controls on parent form depending on an action on the subformin AccessNeoPa, That corrected code worked. I know that you cautioned me about using the BeforeUpdate event, but when I put it in the AfterUpdate event, it locks up, and I must hit ESC to get it to release. When I have it in the BeforeUpdate, it works without a hitch.
So if I should not put it in the BeforeUpdate, where should I put it?
MarkLeave a comment:
-
MNewby started a topic If subroutine to get Now() value in date controls on parent form depending on an action on the subformin AccessIf subroutine to get Now() value in date controls on parent form depending on an action on the subform
I have a from called CAD_CallDispSpl itF. As the name implies, it is a split form. The form has a subform named CAD_Log_DispF. Link Master Field is ID
Link Child Field is ID_Activity
The link works fine.
The record source for the subform is
Code:SELECT CADLogT.ID, CADLogT.EntryDateTime, CADLogT.Notes, CADLogT.ActionID, CADLogT.Dispo, CADLogT.ID_Activity, CADLogT.EmployeeID, CADLogT.TourID, TourT.UnitAvailable,
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessOkay, Neo..... It finally sunk into my thick head. Linking those two tables did work. I removed the UnitAvailable field in the CADLogT. The Case ladder in the Before Update does change the value as I need. Wow.... thanks for being patient. I am sure I will have other questions. I will consider this post solved.Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessAll 4 are correct. The only reason I had a UnitAvailable field in subform CADLogT was so that I could do a Update query.... but as I mentioned before, that is not efficient I don't believe.Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessIf it would be easier for you to understand, I can zip the db and post it.... it has no live confidential data in it.Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessThere would be several TourIDs in the log pertaining to the same incident ActivityT.ID. For instance the unit (TourID) is dispatched to the call (ActionID 1), the same unit arrives on scene (ActionID 3), the same unit returns available (ActionID 10), etc..... all on a separate record in the CADLogT. In each record in the CADLotT, there is a UnitAvailable field. It changes based on the Select Case ladder.
It is certainly possible...Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessThe UnitAvailable flag in the subform's table changes based on the Select Case ladder in the subform's Before Update event. I showed that Case ladder in earlier post in this thread. Right now I am relaying on an Update Query to update the UnitAvailable field in the TourT table, which does not seem to be efficient.
Perhaps I am wrong but I do not believe I can link the TourT table and the CADLogT together and make that query the record...Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessMaybe a simpler way for me to say it is this way.
If the ActionID value in the ActionID control on the subform named CAD_LogDispF is a 1 or 2,
AND
If the DispDateTime value in the DispDateTime control in the parent form CAD_CallDispSpl itF is empty,
THEN
the value in the DispDateTime field in the parent form CAD_CallDispSpl itF should equal the value in the EntryDateTime...Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessOkay, we will fist talk about the subform CAD_LogDispF with its record source being CADLogT.
When the operator selects the Unit (TourID) in the TourID control, it of course placed that TourID value in that field. Then the operator tabs to the next control, ActionID and selects the appropriate action, i.e.
DP is Dispatched Primary which has a value of 1
DB is Dispatched as Backup which has a value of 2
...Leave a comment:
-
MNewby replied to Refresh or requery parent form's source data when tabbing to a new record in the subformin AccessNeoPa, just to continue, the [EndingDateTime] is a control on the subform. It is a Now() function in the subform's BeforeUpdate. I did not use it as the control's default value because the record might sit there for several minutes.... I need the timestamp of the action to be when the record is saved. so when the [EndingDateTime] is saved on the subform's record source CADLogT, I need the [EndingDateTime] on the parent form CAD_CallDispSpl itF to...Last edited by NeoPa; Aug 23 '22, 02:36 PM. Reason: Resurrected. Not ok to replace posts except in extreme circumstances. Mods will do that only.Leave a comment:
-
MNewby replied to Refresh or requery parent form's source data when tabbing to a new record in the subformin AccessNeoPa, thanks and I believe I just solved the problem. I'm sure I will have more. :(...Last edited by NeoPa; Aug 23 '22, 02:37 PM.Leave a comment:
-
MNewby replied to Refresh or requery parent form's source data when tabbing to a new record in the subformin AccessThis is what the main and subforms look like in form view. Then I will show what they look like in design view. The subform is linked to main form as follows:
[IMGNOTHUMB]https://bytes.com/attachments/attachment/10579d166126320 2/snap-2022-08-23-09.57.44.jpg[/IMGNOTHUMB][IMGNOTHUMB]https://bytes.com/attachments/attachment/10580d166126320 2/snap-2022-08-23-09.56.35.jpg[/IMGNOTHUMB]...Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessIf I put this image in correctly, this will give you a visual depiction of my forms being used and their underlying tables.
[IMGNOTHUMB]https://bytes.com/attachments/attachment/10574d166126259 2/snap-2022-08-22-17.58.46.png[/IMGNOTHUMB][IMGNOTHUMB]https://bytes.com/attachments/attachment/10575d166126259 2/snap-2022-08-22-18.00.22.png[/IMGNOTHUMB][IMGNOTHUMB]https://bytes.com/attachments/attachment/10576d166126259 2/snap-2022-08-23-09.40.58.j...Leave a comment:
-
MNewby replied to Taking value from a control in a form and place that value in a field in another table.in AccessOkay, obviously I need to join the TourT.ID = CADLogT.TourID, I assume as a one (TourT.ID) to many CADLogT.TourID, correct? Also, do I need to join the UnitAvailable field in both in order for the UnitAvailable field in both to match values after the record is saved in CADLogT?Leave a comment:
No activity results to display
Show More
Leave a comment: