Form for table

Here's the problem:

Access 2003, XP Pro-

I have three tables that are related by primary keys. I have a
table[Table QC] that has the field [EmployeeID], the data type is
number--that field is linked to the autonumber primary key of the
Employees Table. So far so good. I am trying to make a form that has a
combo box that looks to the Employee Table to get me the drop down of
the employees (Last Name, First Name). The SQL statement builds out
okay, and I get the correct name config., but because the data type is
a number it won't accept the data. I looked at the Northwind example
and it is identical to what I am trying to do. I have the properties
set identically. In the Northwind example the names show in the field
Last Name, First Name, but the data type is set for number. I must be
missing something simple. Please help.

Thanks,

Sean

0
schongresh
6/9/2007 1:19:50 AM
access.forms 6864 articles. 2 followers. Follow

3 Replies
543 Views

Similar Articles

[PageSpeed] 46

schongresh wrote:
> Here's the problem:
>
> Access 2003, XP Pro-
>
> I have three tables that are related by primary keys. I have a
> table[Table QC] that has the field [EmployeeID], the data type is
> number--that field is linked to the autonumber primary key of the
> Employees Table. So far so good. I am trying to make a form that has a
> combo box that looks to the Employee Table to get me the drop down of
> the employees (Last Name, First Name). The SQL statement builds out
> okay, and I get the correct name config., but because the data type is
> a number it won't accept the data. I looked at the Northwind example
> and it is identical to what I am trying to do. I have the properties
> set identically. In the Northwind example the names show in the field
> Last Name, First Name, but the data type is set for number. I must be
> missing something simple. Please help.
>
> Thanks,
>
> Sean

The ComboBox needs to have a hidden column containing the numeric ID value and 
you make that the bound column.  The control displays text but has a numeric 
value.  If you look again at Northwind you will see that this is how they have 
it set up.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com 


0
Rick
6/9/2007 2:46:18 AM
On Jun 8, 7:46 pm, "Rick Brandt" <rickbran...@hotmail.com> wrote:
> schongresh wrote:
> > Here's the problem:
>
> > Access 2003, XP Pro-
>
> > I have three tables that are related by primary keys. I have a
> > table[Table QC] that has the field [EmployeeID], the data type is
> > number--that field is linked to the autonumber primary key of the
> > Employees Table. So far so good. I am trying to make a form that has a
> > combo box that looks to the Employee Table to get me the drop down of
> > the employees (Last Name, First Name). The SQL statement builds out
> > okay, and I get the correct name config., but because the data type is
> > a number it won't accept the data. I looked at the Northwind example
> > and it is identical to what I am trying to do. I have the properties
> > set identically. In the Northwind example the names show in the field
> > Last Name, First Name, but the data type is set for number. I must be
> > missing something simple. Please help.
>
> > Thanks,
>
> > Sean
>
> The ComboBox needs to have a hidden column containing the numeric ID value and
> you make that the bound column.  The control displays text but has a numeric
> value.  If you look again at Northwind you will see that this is how they have
> it set up.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com- Hide quoted text -
>
> - Show quoted text -

Thanks. The wizard automatically hides the primary key(number). So,
under properties there should be two columns, with the one with the
expression [LastName]&", "&[FirstName] showing visible and the ID
number not-visible?

0
schongresh
6/9/2007 3:43:17 AM
On Fri, 08 Jun 2007 20:43:17 -0700, schongresh <sean@valleyfleetclean.com>
wrote:

>Thanks. The wizard automatically hides the primary key(number). So,
>under properties there should be two columns, with the one with the
>expression [LastName]&", "&[FirstName] showing visible and the ID
>number not-visible?

Yes. The visibility is not handled with a "Visible" property though, but
rather with the ColumnWidths property. Set the width of the ID field to 0 and
that of the concatenated name to something big enough to see the name for most
records.

             John W. Vinson [MVP]
0
John
6/9/2007 4:30:35 AM
Reply:

Similar Artilces:

how to use temporary tables in dex
Hi Somebody has one example of how to use temporary tables in dex Cesar Hi Cesar. Define temp tables just as you would define a SQL table in Dex - but with physical name as "temp" without the quotation. I recommend using database type ctree for performance as it would just create a temp file in your directory. From there on, just use the temp table as you would with normal dex table but remember that once you are done with your routine, your temp table will be deleted automatically. Use temp table as a temporary repository for your calculations, reports, etc. ---Darryl Baj...

Max Limit for Values in List Boxes and Combo Boxes in Outlook forms
Folks, a user is setting up a form. She wants to have several combo boxes and list boxes with between 75 and 300 (yes, 300 -- that's not a typo!) possible values in the combo box or list box. Before she starts work on this, she would like to know if there is a limit on the number of possible values for a combo box or a multi-select list box. Is there a limit? Is it defined by the number of characters in the values box, or the number of actual values? What is the limit? Any help here would be appreciated. Thanks. David consulttech2004@hotmail.com ...

Stop advancing in form with the "next" arrow at end of "list"
I have an editable form for users where they can query by date, etc. However, the next entry arrow allows them to advance beyond the result. For example, if their query resulted in 1 of 4, they can still click to 5, 6, and so on which only adds blank lines to the database table. How do I set this to stop at the last entry of their original query? You can cancel adding new records like this: Private Sub Form_BeforeInsert(Cancel As Integer) Cancel = True End Sub Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Duchess" <Duchess@discuss...

Pivot Table #5
I create a pivot table of growing data each month. Now when I create the pivot table after I set up the layout. I see the message "calculating Pivot Table" but nothing happens. Is there some setting I need to change on my computer. All I get now is a empty new worksheet. ...

Table requires Custom Linking to Excel
I have a table in Word 2000 with various columns. Each row represents one order for a meal package. One of the columns indicates one of three baked pies to order (apple, cherry or pumpkin). Another column indicates whether or not the order has been paid or unpaid. Is there a way to put a total number for each of the pie types ordered into an Excel worksheet? Similarly, would there be a way to analyze all of the rows, and for all rows with an unpaid status, multiply this number by the cost for each meal package, and display this result in an Excel worksheet as money due? Thanks...

Resize Forms in Access 2007
I thought I read somewhere that Access 2007 had a new function, or something, enabling you to have forms automatically resize to fit the screen resolution of the user. Is this correct, or am I wrong? If I am correct, how do you use this feature? Thanks, BobV On Aug 9, 8:41 am, "BobV" <rk...@earthlink.net> wrote: > I thought I read somewhere that Access 2007 had a new function, or > something, enabling you to have forms automatically resize to fit the screen > resolution of the user. Is this correct, or am I wrong? If I am correct, how > do you use this feature?...

How do I add a secondary axis to a pivot table chart?
Using XL2007 - the secondary axis radio buttons are greyed out. Is there a way to add the 2nd axis? Hi, This is chart type dependent. Suppose you have a line chart, right click the series and choose Format Series, the Axis radio button should be available. What type of chart are you using? Cheers, Shane Devenshire "dangelor" <dangelor@discussions.microsoft.com> wrote in message news:2610028F-5FAF-4400-A3E3-B7D0CCEFB443@microsoft.com... > Using XL2007 - the secondary axis radio buttons are greyed out. Is there a > way to add the 2nd axis? ...

Form Based Auth.
Hi All, I have checked the option to use form based authentication but I don't get the web page login - still the pop up login box. I have restarted IIS. This is all internal at the moment till i get the forms working. Any ideas. Regards Joe. Do you have "require SSL" checked on the Exchange (and Public) virtual directories in IIS? Have you tried going to the https:// site manually? Forms-based auth only works with SSL. If you haven't required SSL and you go to the http page, it will still work just fine and will pop up the login box. -- Ben Winzenz Exchange MVP ...

Check if Form is Open
I need to check to see if a form is open in the Onclose of another form. And if it is to requery it, if not do nothing. I did find a Function on The Access Web web site but I'm not sure how to utilize the function. Function fIsLoaded(ByVal strFormName As String) As Integer 'Returns a 0 if form is not open or a -1 if Open If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then If Forms(strFormName).CurrentView <> 0 Then fIsLoaded = True End If End If End Function I need to run this in the OnClose of a form to see if frmHome is o...

Multi-field search form
Hi there, I am rather new to this place, so I would like to thank you all up front for any and all assistance you may provide. :) It has been a while since I worked with MS Access last. What I am trying to do is create a multi-field search form, where any of the fields can be filled which will display a result set. Preferably if no selection in the fields is made, the entire resultset should be shown - this is not a requirement, though. I seem to be a bit at a loss on how to procede with this task or to find any resources to help me get along. Again, thanks for any and ...

pivot tables #9
i posted this on the general forum but i thought maybe someone here can help me. I have a table that has four regions and total sales amount for each reason by week. my pivot table lists all those and totals it per region per month. i want to add in the pivot table a percentage of the regions sales for that one week over the total sales for all four regions. is there a way i can add that to the table? i.e. the table is currently like this: Week 1 East 500 Midwest 487 South 529 West 492 Total 2008 i want to add the percentages like this: Week 1 East ...

display the value of an unbound textbox in a field within a table
I created 3 textboxs to calculate the number of business days between 2 dates. The 3rd textbox contains the value. I now want to have this value displayed in a table field. I'm sure this is easy but I'm a complete novice and have spent far too much time on this already. Can anyone help! Fibi, The general concept of tables is that they are for storage of data in the background. They are not for display of data. That is what forms and reports are for. Therefore, the appearance of the data in the tables is not normally relevant, and the display of calculated values is im...

How the heck do I find tables, views, forms etc... in Access 2007
Can Access 2007 navigation be any more convoluted? I've been spending close to an hour trying to find a single table, query form, etc... now that the navigation has been changed. Is there a way to get the old style back? It does take some time - more than an hour :-) - to become familiar with the new interface in A2007 (NavPane, ribbon, ...) Suggestions: - The title bar at the top of the Nav Pane includes a tick box for: All Access Objects - Set Category to: Object Type - The categories (Tables, Queries, ...) collapse. - Show and use the Search Bar. It filters objects as...

Setting random number range based on query, not table
I have a "quiz" form that randomly pulls up questions from my table. It works fine, and I don't mind that it repeats questions. This allows me to sit and review for as long as I want. The problem is, that I want to use criteria in a query to limit the available questions. If I base this form on a query and limit the number of questions, the code I am using is still setting the maximum number as the number of records in my table. In the past, I had a similar database (which I have lost) that would open the form, set the selector to the last record available to the form,...

show pictures in a form
i am trying to make a database and i have a record that has a hyperlink to a picture i have two question 1) is the hyperlink the best choice to use for the picture 2) how do i make the picture visble on a form thank you for your help sorry i sent this to the wrong newsgroup how every any advice would still be appreciated "William Storey II" <billstorey@sbcglobal.net> wrote in message news:zguub.30991$TL5.30867@newssvr25.news.prodigy.com... > i am trying to make a database and i have a record that has a hyperlink to a > picture > > i have two question > &g...

Pivot table returns `
I have data from an SQL WBC-A. When I pivot this data it returns ` (The character below the tilde) Any other data returns the correct pivot. E.g. WBC-X returns WBC-X ...

get/change first operation on table 'uprEmployeeCount' failed
I created a 'test' company on V10, restored the backup from our real company into this test company. I have inactivated all the employees in the test company. Unless I enter Dynamics as sa, I get the following message: A get/change first operation on table 'uprEmployeeCount' failed accessing SQL Data. Under the more info button: [Microsoft][ODBC SQL Server Drive][SQL Server] The EXECUTE permission was denied on the object 'zDP_UPR41600F_1',database 'DYNAMICS', schemo 'dbo'. I have deleted the UPR41600 table and recreated it but I still get the...

Read XML into Dataset and load SQL server table from Dataset
Hello all, I am working on a project with the following characteristics: 1. Load data from a SQL server table to an xml file 2. Read the xml file into a dataset. 3. Load data from the dataset into another SQL server table. I was able to accomplish the first objective. I used the following code to read the generated xml file into a dataset. Dim strXml As String = "C:\Customers.xml" Dim sr As StreamReader = New StreamReader(strXml) Dim ds As DataSet = New DataSet ds.ReadXml(sr, XmlReadMode.IgnoreSchema) How can I traverse in the dataset and post each row to my desired table on ...

Dynamically Setting a forms Input Parameter Property
Hi , I'm working with a ADP project, I have a form where I set the recordset property at design time to a SQLServer stored procedure that has one parameter. If I set the Input Parameter property of the form at design time all is well. However I'd like to be a little more flexible in that I have the calling object that Opens the form using Docmd.Openform pass OpenArgs to the form. On the Form_Open event I set the InputParameter property of form using the value in OpenArgs. The problem is I'm still prompted with the parameter popup..if I press Ok everything continue on and ...

DailySales Table
Hi There, Does anyone know what Type & TypeID columns referring to in DailySales table in HQ ? I have customization guide but there is no details about that columns. Thanks, Arthur Hi Arthur - my understanding of the Daily Sales table is that it gets populated by some internal function that groups based on supplier, cashier, etc. Here are some old notes I found on what the Daily Sales Type refer to: 1: Supplier 2: Category 3: Department 4: Register 5: Cashier 6: Sales Rep -- the TypeID may refer to the batch that's feeding the info (ie batch.batchnumber ...

Tables and banding color in background
I am creating a template where many tables will need to be used. Our standard is to have banding of rows in the table, and when users want to expand the table, I would like them to be able to have the banding automatically occur. This option appears in Word 2007, but does not function well. Has anyone had success with this functionality? Thanks in advance for your help. Color banding can be applied as part of a table style. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "sharon27lily" <sharon27lily@di...

Pivot Table Refresh error "Problems Obtaining Data"
I can't seem to get data or change the data source. When I refresh, I get the error message "Problems Obtaining Data" When I start the Pivot Table Wizard, the back button is grayed out so that I can't go back and change data sources. Any help is appreciated. ...

printing to a form
how do i print addresses from excel to an address form page? is i possible? the page came out of an address book and i have to do lik 200 of them. thank -- Message posted from http://www.ExcelForum.com ...

Table design question
Hi All, I just wanted to see if the design of some fields in the table are standard practice. The database admin set up a Code_Desc table with fields Code_Type_ID, Code_Value and Code_Desc Code_Desc Code_Type_ID, Code_Value, Code_Desc 1 1 Emp Status - Active 1 2 Emp Status - Inactive 2 1 Emp Type - Associate 2 2 Emp Type - Manager 2 3 Emp Type - Auditor 3 1 ...

Mutiple Table Entry into One form Wthout using subforms
Hello all I have created a form by adding information from several differnt forms and table as they areall getting input by several differnt people on the network. the problem i am having is that i can not make this new form add records and save them for later query or report from it? could someone please help -- Message posted via http://www.accessmonster.com Why do you not want to use subforms? Unless you can join the tables in such a way that the resultant query is updatable (usually a challenge), subforms are the easiest approach. -- Doug Steele, Microsoft Access MVP http://I.Am/D...