Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

Nulling field in subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Geoff - 27 Dec 2005 19:59 GMT
I have 2 fields in a subform that I want to clear called [Date]  - this
works and [Session] - which doesn't .  Session is populated by 4 choices
from a combo box.  All I want to do is clear the combo ready for
reselection.

Forms![Hirer].Form![Bookings Subform]![Date] = ""
Forms![Hirer].Form![Bookings Subform]![Session] = ""
Forms![Hirer].Form![Bookings Subform].[Date].SetFocus

I also want to setfocus  to [Date] in the subform.  This doesn't work
either.

Any help would be genuinely appreciated
Geoff
Anthony England - 27 Dec 2005 20:20 GMT
>I have 2 fields in a subform that I want to clear called [Date]  - this
>works and [Session] - which doesn't .  Session is populated by 4 choices
[quoted text clipped - 10 lines]
> Any help would be genuinely appreciated
> Geoff

Should you check the number of records in the subform?  What if it is zero?
What if it is more than one?  Or perhaps the 'clearing routine' should only
apply to the current record?
If you are doing much Access work you could also use a naming convention, so
that you can distinguish between the control and the database field which is
displayed, e.g. cboSession is a combo bound to the field 'Session' and
txtDate is a textbox bound to the field Date - except that Date is a
reserved word and should be avoided (together with other reserved words such
as Name).  Better to use BookingDate or whatever.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.