The fifth parameter of the OpenForm command tells the form which mode to be in.
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd May God bless you beyond your imagination! Lonnie Johnson ProDev, Professional Development of MS Access Databases Visit me at ==> http://www.prodev.us ----- Original Message ---- From: Dimitris <[EMAIL PROTECTED]> To: [email protected] Sent: Saturday, June 30, 2007 3:22:01 PM Subject: [ms_access] Setting the Form to "New Record" mode.. well, i finally managed to it. In the event that starts the form B, after the form has been opened i have used a very simple way in VB to fill in the values: DoCmd.OpenForm stDocName, , , stLinkCriteria Form_A.Field1 = Form_B.Field1 Form_A.Field2 = Form_B.Field2 and this works.. well almost, because before asigning the values we should first go to a New Record.. So here's the new chalenge. How do I tell the form (in VB) to go to "New Record" mode? Thanks for all the help, Dimitris --- In [EMAIL PROTECTED] ps.com, "Jackie Home" <feldmannjac@ ...> wrote: > > All you have to do is make sure the field that connects the two forms is > filled in (the primary key and the foreign key). Then refresh the form you > could attach the refresh event to the code for the button that opens the new > form. > _____ > > From: [EMAIL PROTECTED] ps.com [mailto:[EMAIL PROTECTED] ps.com] On Behalf > Of Dimitris > Sent: Monday, June 25, 2007 3:27 AM > To: [EMAIL PROTECTED] ps.com > Subject: [ms_access] form fields filled in automatically acording to another > form (or something :^) > > Hi all, > > i have a form A connected to a table A and I have placed a button > there that will open a form B that connects to a table B. > > A couple of fields r common in these two forms/tables. How can I make > it that when form B opens these common fields get their value > automaticaly filled in according to the corresponding fields of form A? > > Visual Basic I suppose, but how? > > Thanks in advance. I love you :) > Dimitris ____________________________________________________________________________________ Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting [Non-text portions of this message have been removed]
