Get Subform value in Main form

praveen_khm

Registered User.
Local time
Today, 04:59
Joined
Feb 1, 2006
Messages
17
Hi friends,

I need to show the value of a subform in the mainform which pertains to the unique "Proposal Number". Please find the attached where I have shown the date textbox and the subform.

The question is, Can I get the value of the last entered date in the date subform, to the main form date textbox?

Please suggest as I am scratching my head in this access which is very new to me.

Thanks,
Praveen
 

Attachments

Helllloooo....
any help please...??? Am not able to go further without this.
 
Paste this into the control source of the text box
Code:
=DMax("[Date]","Proposal Invoice","[Proposal Number]=Forms![Proposal Table]![Proposal Number]")
Note that you need to change your naming conventions, especially:
- Date is reserved word and should not be used as an object name
- Remove spaces from object names
- Use a prefix that identifies the object, eg tblProposal, frmProposal
- Recognise that the wizards do stupid things, eg the form wizard will give a default form name that is the same as the table or query that it is based on, it will give a form control the same name as the field it is bound to. This is bad design.
 
Thanks Neil.

This worked. And thanks for the inputs on naming conventions. Since this was my first development in access, it was ignored. Will follow it.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom