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 / Database Design / January 2008

Tip: Looking for answers? Try searching our database.

Multiple text boxes, same source, multiple records, possible?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
psandrew - 07 Jan 2008 17:44 GMT
I am trying to build a form as a type of interactive map, a copy of an
overhead view of farm land.  I have 576 text control boxes, each represents a
single plot of land on the map.  I want to be able to choose a single plot of
land, text box, and have it return only records that apply to it.  Since all
boxes have the same control source, field "Plot ID" in table "Land", I do not
know what I can do, short of making a table with 576 fields and then linking
each form text box to a different table field.  Is there a better way... I
know there is, but can you clue me in?  Thanks a lot.
mscertified - 07 Jan 2008 18:51 GMT
You cannot have that many columns in a table anyway.
I'd make it an unbound form and load the 576 controls in code and save them
in code.
I'm not sure you can have that many controls on a form (I've never attempted
it), check Access Help to see.
Id have the table have a column called PlotID and have relevant data in the
same row or a related table.

-Dorian

> I am trying to build a form as a type of interactive map, a copy of an
> overhead view of farm land.  I have 576 text control boxes, each represents a
[quoted text clipped - 4 lines]
> each form text box to a different table field.  Is there a better way... I
> know there is, but can you clue me in?  Thanks a lot.
Klatuu - 07 Jan 2008 18:57 GMT
Write a sub that opens the report based on the value selected text box.

In the After Update event of each text box, call the function  and pass the
value for the text box to the function:

   Me.txtPlot103_AfterUpdate()
   Call DoReport("103")

Private Sub DoReport(strPlot)

   Docmd.OpenReport, "MyReportName", , , "[Some Field] = '" & strPlot & "'"
End Sub

The code above assumes the field you are filtering on is a text field.  If
it is numeric, it would be:

   Docmd.OpenReport, "MyReportName", , , "[Some Field] = " & strPlot

   
Signature

Dave Hargis, Microsoft Access MVP

> I am trying to build a form as a type of interactive map, a copy of an
> overhead view of farm land.  I have 576 text control boxes, each represents a
[quoted text clipped - 4 lines]
> each form text box to a different table field.  Is there a better way... I
> know there is, but can you clue me in?  Thanks a lot.
 
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.