Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing field value after form record source change

Status
Not open for further replies.

LARiot

Programmer
Feb 7, 2007
232
Hi. Thanks for looking into this. Any help is appreciated.

I have a form and every time the user clicks on a new tab, the record source of the table changes. However, in the VBA I cannot reference the field. It only shows the fields from the original record source. When I type it in anyway it says Method or data member not found. I've done a requery already (right after the record source change) but no use. Any advice? Will I have to do a INSERT from SQL? Seems like I should be able to do it through a simple me.ImagePath1 = "C:\blahblahblah".

Thanks

-Nima
"Pluralitas non est ponenda sine necessitate", i.e., "Plurality is not to be posited without necessity" aka K.I.S.S. (Keep It Short and Simple) -- Ockham's Razor
 
Don't reference the field but the control.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That's actually where the whole problem started. I can't change the image's control source through VBA.

-Nima
"Pluralitas non est ponenda sine necessitate", i.e., "Plurality is not to be posited without necessity" aka K.I.S.S. (Keep It Short and Simple) -- Ockham's Razor
 
I just did an update using DoCmd.RunSQL and it's working fine now. Apparently the control source (which can't be updated through code) supersedes the Picture property.

Further proof that Microsoft uses voodoo and witchcraft in applications.

-Nima
"Pluralitas non est ponenda sine necessitate", i.e., "Plurality is not to be posited without necessity" aka K.I.S.S. (Keep It Short and Simple) -- Ockham's Razor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top