new to making forms on access

Ok 

I have a table whihc has column name title and some survey question.

Now i want to create a form so that when i select Name ( I guess this will 
be combo box) I dont know how to do that even where i can select name ? but 
when i select name the person title auto populates and so does the relevant 
answers to  the questions 

for example i choose John and the title should auto populate and question 1 
should populate also and so on but if i pick adam then everything related to 
adam populates.

Your help will be really appreciated


The table look like this



Name    Title             Question1 Question 2 Question 3

John      Manager            1                  2                  3
0
Utf
5/3/2007 8:37:29 AM
access.forms 6864 articles. 2 followers. Follow

3 Replies
505 Views

Similar Articles

[PageSpeed] 47

On Thu, 3 May 2007 01:37:29 -0700, Arain <Arain@discussions.microsoft.com> wrote:

>Ok 
>
>I have a table whihc has column name title and some survey question.
>
>Now i want to create a form so that when i select Name ( I guess this will 
>be combo box) I dont know how to do that even where i can select name ? but 
>when i select name the person title auto populates and so does the relevant 
>answers to  the questions 
>
>for example i choose John and the title should auto populate and question 1 
>should populate also and so on but if i pick adam then everything related to 
>adam populates.
>
>Your help will be really appreciated

Your combo is probably "bound" to the Name field, in which case all you're doing when you select a new name is
overwriting the data in the current record with your selection.

In your case, you should make the combo "unbound" by deleting the value in the .ControlSource property of that combo.
Next, write code in the AfterUpdate event of the combo to go to the selected record:

Sub MyCombo_AfterUpdate()

Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone

rst.FindFirst "Name='" & Me.MyCombo.Column(0) & "'"

If Not rst.NoMatch Then
  Me.Bookmark = rst.Bookmark
Else
  MsgBox "No Match Found"
End If

Set rst = Nothing

End Sub

This would take you to the record selected, and would populate your form with the data from that record.

Additionally: I'd urge you to reconsider your table design, as well as your column names. Anytime you see columns named
xxxx1, xxxx2 etc then you're almost certainly working with a bad design. Also, what happens when John needs to take a
new survey, but you need to save the results of the old survey?

I'd think you would want a separate table for Users/People, on for SurveyDetails, another for SurveyQuestions, and one
for SurveyAnswers. Users would contain info on the people (Name, Phone, etc), SurveyDetails would contain "header" info
on the survey (NameOfSurvey, DateBegun, BuiltBy, etc), SurveyQuestions would contain the actual questions for a specific
survey (and would be related to SurveyHeader), and SurveyAnswers would contain User answers for that survey 

As to column names: Name is a Reserved Word in Access/Jet, and while it may not cause troubles now, as your database
grows and your coding needs become more complex you'll eventually find problems with using Reserved words. Most
professional developers adopt a Nameing Convention (search on that term for more info than you bargained for) to get
around this; for example, Name is obviously a Text field, so you could change it to "sName" or "txtName" or "strName"
.... this not only avoids using reserved words, but it also gives you a clue as to what datatype you're dealing with.
While that is pretty obvious with a column like "Name", in many cases it's not so clear ... 








>
>
>The table look like this
>
>
>
>Name    Title             Question1 Question 2 Question 3
>
>John      Manager            1                  2                  3

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
0
Scott
5/3/2007 9:58:16 AM
Where do i add the code and how do i make the name box a drop down where i 
can select name right now its just showing one name.

"Scott McDaniel" wrote:

> On Thu, 3 May 2007 01:37:29 -0700, Arain <Arain@discussions.microsoft.com> wrote:
> 
> >Ok 
> >
> >I have a table whihc has column name title and some survey question.
> >
> >Now i want to create a form so that when i select Name ( I guess this will 
> >be combo box) I dont know how to do that even where i can select name ? but 
> >when i select name the person title auto populates and so does the relevant 
> >answers to  the questions 
> >
> >for example i choose John and the title should auto populate and question 1 
> >should populate also and so on but if i pick adam then everything related to 
> >adam populates.
> >
> >Your help will be really appreciated
> 
> Your combo is probably "bound" to the Name field, in which case all you're doing when you select a new name is
> overwriting the data in the current record with your selection.
> 
> In your case, you should make the combo "unbound" by deleting the value in the .ControlSource property of that combo.
> Next, write code in the AfterUpdate event of the combo to go to the selected record:
> 
> Sub MyCombo_AfterUpdate()
> 
> Dim rst As DAO.Recordset
> Set rst = Me.RecordsetClone
> 
> rst.FindFirst "Name='" & Me.MyCombo.Column(0) & "'"
> 
> If Not rst.NoMatch Then
>   Me.Bookmark = rst.Bookmark
> Else
>   MsgBox "No Match Found"
> End If
> 
> Set rst = Nothing
> 
> End Sub
> 
> This would take you to the record selected, and would populate your form with the data from that record.
> 
> Additionally: I'd urge you to reconsider your table design, as well as your column names. Anytime you see columns named
> xxxx1, xxxx2 etc then you're almost certainly working with a bad design. Also, what happens when John needs to take a
> new survey, but you need to save the results of the old survey?
> 
> I'd think you would want a separate table for Users/People, on for SurveyDetails, another for SurveyQuestions, and one
> for SurveyAnswers. Users would contain info on the people (Name, Phone, etc), SurveyDetails would contain "header" info
> on the survey (NameOfSurvey, DateBegun, BuiltBy, etc), SurveyQuestions would contain the actual questions for a specific
> survey (and would be related to SurveyHeader), and SurveyAnswers would contain User answers for that survey 
> 
> As to column names: Name is a Reserved Word in Access/Jet, and while it may not cause troubles now, as your database
> grows and your coding needs become more complex you'll eventually find problems with using Reserved words. Most
> professional developers adopt a Nameing Convention (search on that term for more info than you bargained for) to get
> around this; for example, Name is obviously a Text field, so you could change it to "sName" or "txtName" or "strName"
> .... this not only avoids using reserved words, but it also gives you a clue as to what datatype you're dealing with.
> While that is pretty obvious with a column like "Name", in many cases it's not so clear ... 
> 
> 
> 
> 
> 
> 
> 
> 
> >
> >
> >The table look like this
> >
> >
> >
> >Name    Title             Question1 Question 2 Question 3
> >
> >John      Manager            1                  2                  3
> 
> Scott McDaniel
> scott@takemeout_infotrakker.com
> www.infotrakker.com
> 
0
Utf
5/3/2007 11:00:00 AM
On Thu, 3 May 2007 04:00:00 -0700, Arain <Arain@discussions.microsoft.com> wrote:

>Where do i add the code and how do i make the name box a drop down where i 
>can select name right now its just showing one name.

You can change a Textbox to a combo by right-clicking the textbox and selecting Change To - Combobox

The code would go in the AfterUpdate event of that combo ... and again, you'd have to change the values of the
table/field/column/control names to match those in your application

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
0
Scott
5/3/2007 1:12:45 PM
Reply:

Similar Artilces:

New page on Video Carrdds
I have created a new page on video cards from my forum and from my reviews etc. Lots of helpful information with more to come. Vendor neutral its meant to be helpful without a vendor calling the shots. -- http://contract-developer.dyndns.biz ...

opening a new document w/ a custom stencil open
I have created a custom stencil for users in my workgroup and saved the file to a network directory. Currently, to use it we do FILE>SHAPES>OPEN STENCIL and navigate to the file. I'd like to make this more transparent. What I'd like to do is have something where the user does FILE>NEW and when I get the "Choose New Drawing Type" I'd like to insert my custom 'templates' (not sure if that's the right term in Visio) and when the user selects one of those it opens the editing window w/ my custom stencils already loaded. IOW, I want it to work just like o...

Updating a table from Form Entry
I have a form that pops up when a user clicks a button to Print said form. The form is for the user to enter the name of the table and any footnotes for that particular form, this form is connected to a table that stores this information for everytime the report is printed. THe problem I having is that when the user enters the information and clicks [PRINT] the report is blank, when I open the table the info the user has entered has not updated onto the table yet. Is there a way so that when the user clicks [PRINT] the footnote table will update BEFORE the report prints? Larry -- Neve...

Update textbox on form
The following are events on two combo boxes on a subform "NewJobsSubform", the first sets the rowsource of the second and also sets a default value in the second. The second event sets the value in the text box "Sell" to the price associated with the RepProduct in cboRepProduct - collected from the table "RepairProducts". "Private Sub cboCatName_AfterUpdate() On Error Resume Next Me.cboRepProduct.RowSource = "SELECT RepairProduct.RepProduct FROM" & _ " RepairProduct WHERE CatName = '" & Me.cboCatName.Value...

Can't Make Attachment
I just upgraded to outlook 2003 and now I can't drag and drop files into a new mail message; even though I can click on the paper click and attach a file that way. I had this functionality prior to upgrading to Outlook 2003. I am running Windows XP. Please advise if anyone knows of a setting for this or a registry fix. Thanks.........Jason Steeves ...

Access 2000 Package and Deployment Wizard problem!
I have created an Access 2000 application that I now wish to distribute to users as an MDE file. The Access 2000 Package and Deployment Wizard does a fine job of storing the relevant installation files on a CD, exploiting A2K Runtime. However, I would prefer to let users download my application from a website. The Package and Deployment Wizard offers a 'Web Publishing' deployment option that appears to address this need. My only problem is that it doesn't work for me. I get the following error message, Unexpected error number 48 has occurred: File not found: WebPost.dll I...

Forms Based Authentication
I have configured Exchange 2003 Server on Windows 2003 Server. Everything works , HTTP,HTTPS, OWA Password change , but whenever I enable forms based authentication I recieve an error "440 login timeout" and the page will not load. Pls Help Regards I hesitate, because it doesn't fully match your diagnosis but take a look at: http://support.microsoft.com/default.aspx?scid=kb;en- us;817379 to see if it's of any help. >-----Original Message----- >I have configured Exchange 2003 Server on Windows 2003 Server. Everything >works , HTTP,HTTPS, OWA Password change ,...

Publisher Pic Problems & VGA Driver
Hi, I'm very frustrated. I too cannot see any embedded photos when I open up my Publisher doc for editing. Tried everything in Help & now have read everything in the Online Support. (Btw, I'm not absolutely positive but I think this "invisible pics" problem started happening after I downloaded Flash 8, as a last resort I will uninstall it). Anyway, I have an Asus W5A laptop with Windows XP Pro. It has Intel Centrino Mobile which includes an Intel (R) 915/GM Chipset driver. So following suggestions on this site, I went to the Intel to find driver downloads to upd...

How Do I Copy My Outlook Files To My New Computer?
I exported my Outlook files from my old computer and burned them to a CD. During the export process, it asked me three times for a password. When I tried to import these files to my new computer I got "File access is denied. You do not have the permission required to access the file." Can anyone help? Apart from the fact that Import/Export options often lead to corruption - you should use a simple pst copy - The pst needs to be on the hd and the read only flag off, before In OL attempting to open it. NB not import <aprice6@hotmail.com> wrote in message news:1145746658.84...

referencing to worksheet names in macro for each new worksheet inserted
Hi I created a code to insert new worksheets and rename them according t values on the new worksheet itself. Say in Cell D1, i have th worksheet name. My question is when i want to refer to this worksheet in subsequen coding, how should i code it? For eg, How should i write the ???? for Sheets("????").select? Would creatin the a variable to store the names help? Thanks in advance Ken -- Message posted from http://www.ExcelForum.com After inserting your new worksheet set it's name equal to a variable. For example SHEETS.ADD VWORKSHEET = ACTIVESHEET.NAME This method ...

SQL Back-end / Access Front-end using linked tables????
I have a backend that contains tables that I pull Driver information, Customer information , etc. (these are MAS 200 accounting software tables that are exported nightly to the SQL backend). I also have on the backend tables that I push information to; information that we enter on the forms located on the front end. I might not have this set- up correctly, but I'm linking all tables on the back end to the Access database on the front end. When trying to set up an Auto Lookup off of a query I've created in Access it says I need to go into the table change Data Type to the Lookup wizard,...

autocomplete (like Access)
Hi, I'm trying to restrict the entry of data into cells based on values in a list. What I need is similar to Data Validation but I want Excel to complete the entry after the user has entered just the first character. For example, In Microsoft Access, when creating a new table in Design view, first you enter the field name, then tab across to Data Type. Entering a "c" and then tab automatically enters "Currency" as the data type. Similar for "d", DateTime; "t", Text etc. So, in Excel, if I have a list, say, New York, London, Sydney, Tokyo. Typi...

Where Can I Find The Icon For A New E-mail Message In Outlook?
I've created the shortcut "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /c ipm.note for my Outlook to open a new message but it assigns the Outlook Icon... Thanks Assuming you are using an English version Outlook 2003, you might find what you are looking for at: \Program Files\Microsoft Office\OFFICE11\FORMS\1033 "Justern" <justern@hotmail.com> wrote in message news:4133cc19$0$27218$61ce578d@news.syd.swiftdsl.com.au... > I've created the shortcut "C:\Program Files\Microsoft > Office\OFFICE11\OUTLOOK.EXE" /c ipm.note for m...

Data from Access query to Excel
To pull data from an Access 2003 database, I have created the queries in Access, then import into Excel. The problem is that all the numbers that are pulled into Excel are text and need to convert them into numbers to run formulas on. I have converted a few sheets by hand, but, some have will over 50,000 rows. Is there a function to select all number colums (the colums are the same through out the sheets) and convert? Thanks There are instructions here for converting text to numbers: http://www.contextures.com/xlDataEntry03.html You can select all the columns, and only the num...

View in new Portfolio Manager
Older portfolio manager had a view available which displayed by type of security. I am unable to find this option in the new portfolio manager. Am I missing something? Charlie On May 22, 9:57=A0pm, charlie <char...@discussions.microsoft.com> wrote: > Older portfolio manager had a view available which displayed by type of > security. =A0I am unable to find this option in the new portfolio manager= .. =A0Am > I missing something? > Charlie You didn't state which version of Money you are using but I'll attempt to answer. If you are using Money Plus, you can choos...

Automatically redirecting profiles to a new exchange server?
OK old exchange server was SERVEROLD and new one is SERVERNEW (for arguments sake). The pc has lots of different profiles on it and I dont wanna manually change each profile to reflect the new server. Running Outlook 2002 is there a way to automatically do this? I believe I can use a prf file created using Custom Wizards from the Office Resource Kit and deploy this to do this for me. Can anyone give any more detailed info on how this can be done? Thanks <carlosvenegas@jellybeandesign.co.uk> wrote in message news:1132785375.328184.274520@g47g2000cwa.googlegroups.com... > OK ol...

Please help with last formula for order form.
I am able to accomplish this with 1 column by the formulas below. Cell H160 is the subtotal: =IF(SUM(H72:H111)>0,SUM(H72:H111),"") Cell H166 the total: =IF(SUM(H160)>0,SUM((H160*H163)+H160),"") Cell H163 is for Tax. I am almost finished creating an order form. I would like to get the SUM of 3 different columns that are separated. I am not able auto fill strait down the column, because the information is separated in groups with titles, and the cells are not identically sized. I tried varations of this formula: =IF(SUM(H72:H111)+(116:131)+(135:154)>0,SUM ((H72:H...

Createing Quote sometimes make Error: 80070057
Hello NG, Today I found some funny problems. I create Quotes via the quote WebService from the CRM. This normally works fine, but now I have some quotes, which will get me an error, when I open it. This error is no normal error, I will get an white/yellow Page with ASPX Errorpage: Here the Message (sorry but I only have this error in German): Serverfehler in der Anwendung '/'. ---------------------------------------------------------------------------- ---- Falscher Parameter. Beschreibung: Beim Ausf�hren der aktuellen Webanforderung ist ein unverarbeiteter Fehler aufgetret...

Custom Menus in Access 2007
I know in VB 6 you can create custom pop-up menu. Is there a way to do this in Access 2007? Active X? DLL? Hidden command that I can't find? Any tutorials or direction? Any help or direction that anyone can provide would be appreciated. In earlier versions, called "shortcut" menus. Right click on menu bar, select customise, show "shortcut menus" tollbar, select "custom". don't know if that tollbar has changed in 2007. (david) "Jerry Sheldon" <JerrySheldon@discussions.microsoft.com> wrote in message news:7431915F-33FF-4534-B5B4-C5E6F...

Access 2007 Runtime 10-30-07
1. Can I distribute Accees 2003 applications using Access 2007 runtime? 2. Do I also need the runtime extensions? 3. Will installing the Access 2007 runtime and extensions affect my current Access 2003 (full version) software, already installed? ...

Automatically generate a new record
Can I autumatically generate a new record adding information (future date) from a current record? Yes. In your form have Double-click event call an append query that pull data from your form fields to append one record. INSERT INTO [YourTableToAppendInto] ( Field1, Field2, Field3, Field4 ) SELECT TOP 1 [Forms]![YourForm]![1stField] AS [X], [Forms]![YourForm]![2ndtField] AS [Y], [Forms]![YourForm]![2rdtField] AS [Z], [Forms]![YourForm]![4thtField] AS [A]; -- KARL DEWEY Build a little - Test a little "Crown Jenny" wrote: > Can I autumatically generate a new record addin...

Update Existing Purchase Orders with New Exchange Rate
Hello, I have existing Purchase Orders in Great Plains 8.0 were some of the line items have been received is there a way to change the exchange rate for the remaining line items and any new line items added? Thanks, Brian M. Database Administrator ...

can't find form
i have a command button on a form [frmMainMenu] that when clicked, closes that form and opens another [frmFixtureSchedulePrintOptions]. The 2 share the same table as a record source, so i'm doing this to avoid conflicting updates the code behind [frmMainMenu] reads like this (below), and functions correctly DoCmd.Close stDocName = "frmFixtureSchedulePrintOptions" DoCmd.OpenForm stDocName, acNormal on the new form [frmFixtureSchedulePrintOptions], there is a command button to save to close itself, and open the previous from [frmMainMenu], and the ...

How do I make door hangers using publisher?
Is this even possible? Mary Sauer has a website with a generous collection of goodies including door hangers. Take a look at just above George Washington's portrait (way down the page) at, http://msauer.mvps.org/publisher_projects2.htm -- Don - Publisher 2000� Vancouver, USA "medinapie" <medinapie@discussions.microsoft.com> wrote in message news:986B8199-C9B5-46CE-8F2F-C772BE5C21BC@microsoft.com... > Is this even possible? I have a sample on my web page. Scroll down -- on the left. http://msauer.mvps.org/graphics.htm Some cute ones here that you could mod...

What program is trying to access e-mail address information stored in outlook?
I have one user (Vista Business, Outlook 2007 connected to Exchange 2003) who has today started to see a pop-up from Outlook saying: "A program is trying to access e-mail address information stored in Outlook. If this is unexpected, click Deny and verify your antivirus software is up-to-date." Anti-virus (McAfee) is up todate, and I'm doing a scan now and afterwards will do a separate scan for malware. This user tells me that he hasn't knowingly installed anything recently. My question is: is there any way to determine what the program is which is try...