A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

form



 
 
Thread Tools Display Modes
  #1  
Old June 16th, 2007, 12:25 AM posted to microsoft.public.access.tablesdbdesign
[email protected]
external usenet poster
 
Posts: 11
Default form

I have 30 sections in my office, i have a database with a form for
each section. How do i create a form that will let them choose their
section from a pull down and open their form based on their section
selection.

  #2  
Old June 16th, 2007, 05:03 PM posted to microsoft.public.access.tablesdbdesign
Scott McDaniel[_3_]
external usenet poster
 
Posts: 8
Default form

wrote in message
ups.com...
I have 30 sections in my office, i have a database with a form for
each section. How do i create a form that will let them choose their
section from a pull down and open their form based on their section
selection.



You could use a combobox with each section listed, then use the AfterUpdate
event to open the form based on the user's choice. For example, set the
combo's RowSourceType to Value List, then add this in the RowSource:

Section 1;Section 2;Section 3 etc etc

Then, in the AfterUpdate event of the combo (I'll name the combo
cboChooseSection):

Sub cboChooseSection_AfterUpdate()
Select Case me.cboChooseSection.Column(0)
Case "Section 1"
DoCmd.OpenForm "fmSection1"
Case "Section 2"
Docmd.OpenForm "frmSection2"
Case Else
End Select
End Sub

Of course, you'll need to change the names of the forms and such to match
those in your project.

  #3  
Old June 17th, 2007, 01:01 AM posted to microsoft.public.access.tablesdbdesign
Steve[_10_]
external usenet poster
 
Posts: 608
Default form

Consider putting all your data in two tables:
TblSection
SectionID
SectionName

TblMyData
MyDataID
SectionID
Fields for all your data

Next you need a query that includes both fields with the following criteria
for SectionID:
Forms!PFrmSelectSection!SectionID

You then need a form, FrmSectionData, based on the query.

Next to last you need a pop-up form named PFrmSelectSection with a combobox
named SectionID. The rowsource of the combobox needs to be the following
SQL:
Select SectionID, SectionName From TblSection OrderBy SectionName
The properties of the combobox need to be:
BoundColumn 1
Column Count 2
Column Width 0;2

In the AfterUpdate event of the combobox you need the following code:
Me.Visible = False

Lastly, you need the following code to open PFrmSelectSection:
DoCmd.OpenForm "PFrmSelectSection",,,,,acDialog
DoCmd.OpenForm "FrmSectionData"
Docmd.Close "PFrmSelectSection"

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications






wrote in message
ups.com...
I have 30 sections in my office, i have a database with a form for
each section. How do i create a form that will let them choose their
section from a pull down and open their form based on their section
selection.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.