473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Form Problem with Field

16
Our company likes to keep track of when we calibrate certain pieces of machinery. A form was created to log that data in a table. I was asked if I could add another piece of machinery to the list because it was just purchased. I found out that someone manually put in the Row Source (looking at the property sheet). My thoughts were to create a table so if they need to add another piece of machinery that all they needed to do was add it to the table. But come to find out, the form field is connected to a table field that only accepts numbers. I ended up writing over what was previously there and cannot fix it. I need to be able to choose a number for that field but also display the machine name.

Example:

1/Tool 1
2/Tool 2
etc

If you need pictures or something to help visualize please let me know.
Feb 25 '14 #1

✓ answered by Seth Schrock

A combo box allows you to do to exactly that. Just set the column count property to 2, and then set the column widths to 0; 1 (assuming measurements are in inches). This hides the first column, but the controls will still be bound to the first column (this can be changed, but the default is bound to column 1). So the value stored will be the number, but the value shown will be the tool name. This works for both value lists and data sources. So if you have a table of tools, then just make the row source be a query that gets the tool's ID and the name.

6 947
Seth Schrock
2,965 Expert 2GB
A combo box allows you to do to exactly that. Just set the column count property to 2, and then set the column widths to 0; 1 (assuming measurements are in inches). This hides the first column, but the controls will still be bound to the first column (this can be changed, but the default is bound to column 1). So the value stored will be the number, but the value shown will be the tool name. This works for both value lists and data sources. So if you have a table of tools, then just make the row source be a query that gets the tool's ID and the name.
Feb 25 '14 #2
devarts
16
Thank you so much! I completely forgot that one could do that! It solved all my issues!

Thanks!
Feb 25 '14 #3
zmbd
5,501 Expert Mod 4TB
OK, this is why we stress normalization so strongly here!

The rowsource for your tools should have been a table and then you would have had a history or log type table.

BACKUP YOUR DATABASE! Never ever develop on the production database.

Provided you haven't altered your control's rowsource.
list the data so that you have the numeric and text (as you've done for the examples 1,tool1...

This may not be the best fix; however, it should get you back up and running.

Now, create a table with an autnumber field and enter the correct name against the autonumber

tbl_tools
[tools_pk] autonumber, primary key
[tools_name] text(30)

so the first new record would be: 1, tools 1... etc...

Go back to your form.
Open the properties on the control
data tab
Row Source Type: Table/Query
Row Soucce: tbl_tools
Bound Column: 1

format tab
Column Count: 2
Column Widths: 0,1
Column Heads: no
List Width: Auto \
(if not option then 1.5 ... add 0.5 to the column widths lagest value)

Close and save the form

You should be back up and running.

I would also go into database tools and set the relationship between the tbl_tools and the table where this information is setup.


Now if you are using sharepoint list then there's a whole other monkey we need to shoot instead (please say no, no, no, .... happy place...)
Feb 25 '14 #4
Seth Schrock
2,965 Expert 2GB
No problem. Glad to help.
Feb 25 '14 #5
zmbd
5,501 Expert Mod 4TB
opps.... cross posted with Seth.
Feb 25 '14 #6
devarts
16
I usually do back my databases up but it seemed like an easy fix from the beginning because I've seen people do this before. But I have learned my lesson.
Feb 25 '14 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: michael nieuwenhuizen | last post by:
how do i create a sticky form with multiple fields? say i want a form with: name: address: country: and if a user presses the submit button it will show
1
by: Mike the Canadian | last post by:
I am having a strange problem with field verification in a form. The JavaScript below works just fine in Firefox but in IE. "license" is a pull-down list and "requiredDiscount" is a text field....
5
by: Newbee | last post by:
Hi, I would like to have form with Tab Control with 3 pages. Each page in tab control would contain text boxes from different sources (tables). On first page would be text boxes from tblOne,...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
2
by: Chippy | last post by:
I am having trouble working out how to update a field on an open form with a calculation based upon calculations from other tables! For example, I have 3 tables: Diary Diary_ID: autonum,...
6
by: Dave G | last post by:
I am writing a function to fill in the data in an unbound form. I have a table with field names of 1, 2, 3 etc up to approx 100. I have an unbound form with fields called 1, 2 3 etc. I gave...
3
by: Bobby | last post by:
Hi, I have an application which uses Access 2003 as both the FE and the BE. However, for a number of good reasons, I am in the process of converting the BE to SQL server 2003. I am not converting...
1
by: NHNeedsHelp | last post by:
Hi, about to go nuts - I have a master form with 3 control buttons, user picks 1 for Const. job, 2 for Envir job and 3 for Geo job. Each button opens a subform containing the project number from...
10
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some...
7
by: ggfota | last post by:
I have problem creating Access (Continuous) Form with indepenent CheckBox for each record. The user should be able to select records that will be processed by VBA based on ChceckBox value. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.