Move Parent form record from subform control

Chrism2

Registered User.
Local time
Today, 07:29
Joined
Jun 2, 2006
Messages
161
Hi folks... this little one is teasing me.

I have a Parent form, frmMainDisplay which displays information from tblCustomers.

It has a subform for editing Customer Details - it's not a linked subform as they both use the same record source.

The subform is called sfrmEditCustomer. The key is CustomerID.

I have a control on this sub form which saves the edited customer information. When the user clicks on it, I want it to move the CustomerID on the main (parent) form to the CustomerID just edited/saved.

I've tried a few manifestations of rs.bookmark and DoCmd.gotorecord but I'm not getting anywhere.

Can anyone give me a useful pointer here. I'm sure it's obvious to someone clever. :)

Thanks in advance.
 
I am not understaning why you have a main form with a subform and both have same control source. Can you explain reasoning behind this, please? It may help to better understand your setup.
 
I don't think that is very good practice. Using a subform with the same source as the main table that is. A subform is meant to hold information related to the main form, not information with the same source. Have you thought about a different way to display it, such as a tab control or by drawing a box to be behind the controls?

But also, as misscrf said, what is your purpose? That will help you get a more focused and helpful answer.
 
Shoot.

Too much coffee andnot enough thought. You are right, when I simply incorporate the fields into the main form, we don't have a problem.

I got into this because orginally the main form was not bound at all; but when I've changed this I've got myself confused.

Bad planning on my part. But thanks for your help and the nudge. :)
 
You are very welcome, sometimes it's the simple things we miss. I had a thread last week where I couldn't figure out what was going wrong with some code, and it turned out that I had forgotten the null phrasing before my formula, so it wasn't reading it as a null formula. Someone noticed it right away, and I felt really embarrassed. :o So it happens to all of us.:p I'm glad you got it working.
 

Users who are viewing this thread

Back
Top Bottom