Charlotte Foust
cfoust at infostatsystems.com
Wed Jun 4 18:30:30 CDT 2003
Oh, you mean nothing in the recordsource, not no records returned by it. So don't remove the recordsource, replace it with one that returns an empty recordset. The way I do it is to use a standard recordsource that returns no records (i.e., "SELECT * FROM MyTable WHERE 1 = 2"). That allows your form to be bound to the fields in MyTable but since the where condition is always false, it returns an empty recordset. Then I use code to set the recordsource to the appropriate one when something triggers it such as a choice in a dropdown. Charlotte Foust -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Wednesday, June 04, 2003 10:28 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Dang Bound Forms Again Charlotte: When there are no records in the recourd source the form comes up blank. If I remove the recordsource I get the form but the bound fields have #Name in them because they're bound to unknown fields. ----- Original Message ----- From: "Charlotte Foust" <cfoust at infostatsystems.com> To: <accessd at databaseadvisors.com> Sent: Wednesday, June 04, 2003 10:28 AM Subject: RE: [AccessD] Dang Bound Forms Again > Why would you get #Name? Stuff with an empty table? If the form is > bound, it's bound to the fields, whether there is anything in them or > not. If you are binding the form when you open it, use a default > empty recordset (i.e., WHERE 1=2), which will eliminate the #Name > error but still give you empty bound fields. You would have to change > the recordsource in code, but I generally use an empty recordset as > the default recordsource to make my forms load faster. > > Charlotte Foust > > -----Original Message----- > From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] > Sent: Wednesday, June 04, 2003 8:50 AM > To: AccessD at databaseadvisors.com > Subject: [AccessD] Dang Bound Forms Again > > > Dear List: > > I have a bound form which displays product structures. If the product > structure table is empty (as it would be when the user is just > starting > up) the screen comes up blank. I would like the form to display empty > without the #Name stuff, of course. > > How do you all solve this problem of a bound form bound to an empty > record source? > > MTIA > > Rocky Smolin > Beach Access Software _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com