Seems simple enough Rick. Thanks. Now that I see what you wrote, I kinda realise I have done that before but forgot how. My bad.
Cheers
Stephen [ at ] ZennHAUS
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message news:OU71l.10120$x%.6984[ at ]nlpi070.nbdc.sbc.com...
[Quoted Text] > On Sun, 14 Dec 2008 23:11:12 +1100, Stephen [ at ] ZennHAUS wrote: > >> Hi Guys and Gals >> >> I know this is probably a really simple thing to do, but I want to >> change the properties of an Access form from code. The property I want >> to change expressly is DataEntry. Because I would like to use the same >> form for "data entry only" as I do for viewing and editing records. >> Alternatively, if anyone knows a better way to deal with something like >> this. Ultimately, I would also like to be able to change the DataSource >> property as well depending on how the form is opened. >> >> Cheers >> >> Stephen [ at ] ZennHAUS > > You can control all of this in the code that opens the form. Set the > form to have DataEntry = False as the default. Then to open for "viewing > and editing"... > > DoCmd.OpenForm "FormName" > > When you want to open it in DataEntry mode... > > DoCmd.OpenForm "FormName",,,,acFormAdd > > The last argument above specifies to open the form in DataEntry mode. > > > > -- > Rick Brandt, Microsoft Access MVP > Email (as appropriate) to... > RBrandt at Hunter dot com
|