468,252 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,252 developers. It's quick & easy.

Changing field value in subform

Dee
I'm trying to change a field value on a subform called Inventory
whenever a field on the main form is updated. I can't get it to work.
Could someone correct my line of code?
Private Sub Ctl5inBoxKDeliv_rd_AfterUpdate()

Me!Inventory.Form.K5inBoxK = 99

End Sub
Nov 12 '05 #1
5 18403
On 19 Nov 2003 23:24:10 -0800 in comp.databases.ms-access,
wo********@comcast.net (Dee) wrote:
I'm trying to change a field value on a subform called Inventory
whenever a field on the main form is updated. I can't get it to work.
Could someone correct my line of code?
Private Sub Ctl5inBoxKDeliv_rd_AfterUpdate()

Me!Inventory.Form.K5inBoxK = 99

End Sub


Me!Inventory.Form!K5inBoxK = 99

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2


Me!Inventory.Form!K5inBoxK = 99

does not work either

"Microsoft Access can't find the field 'Inventory' referred to in your
expression."

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Dee, it is possible that the subform control does not have the same name as
the form it contains (its SourceObject).

Open your main form in Design view.
Right-click the edge of the subform control, and choose Properties.
Look at the Name property ("Other" tab) of the subform control.

If' it's called "My Inventory" or something, try:
Me![My Inventory].Form![K5inBoxK] = 99

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dee Simon" <wo********@comcast.net> wrote in message
news:3f*********************@news.frii.net...


Me!Inventory.Form!K5inBoxK = 99

does not work either

"Microsoft Access can't find the field 'Inventory' referred to in your
expression."

Nov 12 '05 #4
Thanks Allen

That was it. Should have known this myself. Had a senior moment her
after 36 hrs of no sleep.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5
On 20 Nov 2003 13:50:39 GMT in comp.databases.ms-access, Dee Simon
<wo********@comcast.net> wrote:
Thanks Allen

That was it. Should have known this myself. Had a senior moment her
after 36 hrs of no sleep.


Nah, sleep is for wusses :-)

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by William Wisnieski | last post: by
9 posts views Thread by William Wisnieski | last post: by
3 posts views Thread by William Wisnieski | last post: by
2 posts views Thread by Michelle | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.