Solved Bring data into form field from a different query

Firstly you do not put it in as an expresssion in AfterUpdate, you put it in as an Event Procedure

The reason the code fails is Access is telling the truth (it rarely lies).

Your control is called Bus# :-( so Access cannot find Bus?

Your uploaded DB does not work as half of the data is missing. :(

1717794350176.png


Put the code from #39 into the AfterUpdate EVENT of the bus control. Rename the control to be bus.
Then try it.
 
Last edited:
God that is slow? :-(

Formname etc?
ya i know :( have alot to clean up. Form name is (CamInoutoMaintTF Form).
I am attaching the Healthcheck repair document table which is imported as I mentioned previously. The form may need when opening just in case. If needed, Wherever to have the databse saved create s folder called 'Documents' and drop this in there.
 

Attachments

Firstly you do not put it in as an expresssion in AfterUpdate, you put it in as an Event Procedure

The reason the code fails is Access is telling the truth (it rarely lies).

Your control is called Bus# :-( so Access cannot find Bus?
I do not know how to create an Event Procedure
ya i know :( have alot to clean up. Form name is (CamInoutoMaintTF Form).
I am attaching the Healthcheck repair document table which is imported as I mentioned previously. The form may need when opening just in case. If needed, Wherever to have the databse saved create s folder called 'Documents' and drop this in there.
Ahh ok I get it now. I placed it in the event procedure and it now updates with the proper date and populate the main maintenance table! Thank you so much for being patient with me to help me solve this. I am truly eternally greatful to you. it is now working as I expected!
 
Please read #41

We are up to 41?

I do not know how to create an Event Procedure

Really?, then who created the code for Form On Open?
1717795008792.png
 
Please read #41

We are up to 41?



Really?, then who created the code for Form On Open?
View attachment 114417
Yes, I am all good now. I created 100% of the database. I was just having a dumb moment. My brain was stuck on tring to use the expression in the properties. And being self taught my mind glitched on the terminology for Event Procedure. I always refer to it as VBA. Thank you for your guidance on this resolution! Now that it is functioning, I have a lot of cleanup to do as you can tell.
 
You can use it as an expression. I proved that and posted the correct syntax in one of my posts.
However if it is set as a default value, then it needs the bus number, which is not going to be present when you start a new record?, so the afterupdate event is better, in my mind at least.
 

Users who are viewing this thread

Back
Top Bottom