List Box Fields Into 2 Fields In A Table

Oct 12, 2006

I have come up with another one that may be easy for you.

I have a form that has a list box with two fields in the table.
Call the table: STATE TABLE1
Call the first field: STATE NUMBER 1
Call the next field: STATE NAME 1

When I access the list box on the form, I have it so I can see the States Name(STATE NAME1) and I click on it and the (STATE NUMBER 1) is place in another table called: INVENTORY2 in the STATE#2 field. That works all well and good.

I would like to be able to continue this, at the same time I select the (STATE NAME 1) on the list box. I also want to place (STATE NAME 1) into the INVENTORY2 TABLE in another field call (STATE NAME2)

I was going to write an expression to do this but had trouble with finding the STATE NAME 1 field.

I am sure there is an easier way.

PS This table is being used in another application and there is no way to modify any of its field at the time of the transfer. All the fields need to be populated at the time of the transfer.

Thanks for your help.

View Replies


ADVERTISEMENT

View Table Fields In A List Box

Feb 20, 2005

Hello, I'm having a spot of bother ....

I have a form that populates, in a list box, the tables within my Access database when it opens. I need to be able to do the following;

1 - Populate another list box on the form with the field names of the table I've selected

2 - Check to see if the table has a specific field, and if not, add that field to the table

Is there anybody out there that has done something similar or knows how to do this?

My programming skills are fairly basic, so I would appreciate an example of the code.

Thanks in advance.

View 4 Replies View Related

Modules & VBA :: List Fields Via Table Info Function

Nov 5, 2013

I a trying to list all fields from ALL tables in a certain DB.I am using the tableinfo function. However, because the output of the immediate window is limited to 200 lines, I can only see the last 200 fields. Is there a way to export this in another way than the debug.print procedure, so I can bypass this limitation?

Code:

Public Sub showtablefields()
Dim db As Database
Dim tdl As TableDef

[code]...

View 5 Replies View Related

Tables :: Save List Box Columns To Table Fields

Mar 31, 2015

What is the correct way to save the values in a listbox column to the fields of a table? I can use rec("field1") = Me.list16.ItemData(Varitem)and that records the bound column to field 1 but how can I save the unbound columns to other fields in the table?

View 4 Replies View Related

How To Get SQL Printout List Of All Fields In A Table In Access 2010

Sep 21, 2013

What I want to do is have the SQL printout list all the fields in a table that I have already created. Also how would I enable SQL view? Im new to Access.

Using Windows Vista and Access 2010.

View 1 Replies View Related

Table Structure For Large List Of Number Fields

Jul 30, 2015

Have a look at this screenshot from excel.

Basically I would like to capture the quantity in stock for the above list of phones at many stores.

I started out by adding each phone model as a numeric field in tblStock, because I need to obtain the quantity value for each and every model, for each and every store.

Is there a better way to do this? I was thinking of creating just 2 fields, Model and Quantity, then adding each model as a record, then using that record as a sort of template. I wander what would be the drawbacks of this, since with the first method, if a user needs to add a phone not on the list he would have to modify the table design.

View 9 Replies View Related

Added Fields To Table But Not Showing Up In Form Field List

Aug 3, 2005

I have a form based on a table and I just added 3 fields to the table. When I go to the form to add these fields, they do not show up in the field list. I've also tried creating a textbox and going to the Data Tab and choosing the data source but those 3 new fields are still not showing up.
How can I go about adding these 3 fields?

Thanks in advance

View 2 Replies View Related

Beginners Question - Auto Update Fields Based On Fields In Another Table

Nov 26, 2007

I don't have any database experience whatsoever so please go easy.
I'm guessing this kind of this is extremely simple for all of you.

I'm constructing a database of network resources and devices and I'd like to automatically update the values in one field based on the values of a field in another table.

The first table is called "IP" and the fields are called "Address", "IP Type" and "Device".
The second table is called "Devices" and contains the fields "Name", "Description", "Asset Number" and "IP".

Here's an example of the tables: (ignore the "code" tag. i've only used it to align my columns properly)

DEVICES:
NameDescriptionAssetIP
XserveFile Server107203.30.144.75
ProliantXDHCP119203.30.144.15



IP:
AddressIP TypeDevice
203.30.144.75Static
203.30.144.15Static


What I want is for the Device field in the IP table to automatically update it's values based on the values found in the Devices table. In this case, the values that should appear in the Device field in the IP table are "Xserve" and "ProliantX".

I've searched through but haven't found a complete solution, just little pieces which I'm too inexperienced to put together myself.

thank you
-Tim

View 2 Replies View Related

Creating New Table From Form Data Fields/clreaing Datat Fields.

Apr 13, 2008

I created a form in Access that retrieves data from a table. Inside the form, I am able to access/populate data fields with data from the table. I also have data fields, inside the form, that requires key-in data. I have some how lost the ability send all data field information to a second table and clear existing data fields for new entry.

Questions: What settings, code or buttons can I use to send/store data field information to a new table? What settings, code or buttons can I use to automatically clear all data fields from my form once data has been sent to the new table?

View 7 Replies View Related

Forms :: Adding Fields In A Table And Having Output Fill Fields On A Form

Jan 29, 2014

I have a totalquery that runs fine and give me the sum for both fields I'm looking for but I can't get the outputs to fill the fields on the form. I have tried the Dcount query in the control source but that just returns an error and locks up access.

Code:
SELECT [Tble-wcDelays].Causedby, Sum([Tble-wcDelays].HoursDelay) AS SumOfHoursDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].Causedby, [Tble-wcDelays].LinkingID
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-ePlusCent]![cleanID]));

That is the query.

View 14 Replies View Related

Modules & VBA :: Pass Data From Fields Into Table And Reset Fields

Aug 27, 2013

I have a database that will register the emails coming in and what time, also the time, date out and person.

I have a form with the fields to be filled in and a submit button. There are some fields that are automatically filled in and others need manually fill in.

below that part is a sheet (subform in the form of sheet) that should be filled in with the above data. Once it is there, it should empty the fields so they are ready to be filled in again. If I fill new data and press the submit button, it should go to the next available row.

View 2 Replies View Related

Search Key Error 3709 On 2 Fields In The Table - All Other Fields Allow Update

Aug 21, 2013

I have a copy of the back-end that gets a search key error 3709 on two records. In other words, I can duplicate the problem.

The interesting part is that I can update any other field on both these records and save the record, but when I try to change two specific fields, I get a Search Key Error and have to ESC out to continue (basically UNDO the change). Both fields are text fields with lengths of 7 characters and 255 characters, and both are COMBO Boxes on the form.

I tried to focus on the form think there was an issue in the code. I can definitely TRAP the 3709 error on the ON ERROR event on the form using "if dataerr = 3709", but then I tried something even simplier.

I went directly to the table and to each of the records. Again I can update any other field in the record but these two specific fields. When I try to change either of them and move to another record, you get a Search Key Error 3709.

By going to the table record directly I'm as low level as I can get. There are no validation rules on either field at the database level. If it was truly CORRUPT would it let me update any of the other fields on either of these records? One is an empid (not a primary key but is indexed with duplicates okay and not required), and one is status code (not a primary key but is indexed with duplicates okay and not required) so they're no critical fields, but something is keeping them from CHANGING.

Just tried something else; deleted the INDEXES on both the fields. Now it works! I am completely confused now because it really wasn't a corrupt record, but the indexes are causing the problem. Do I need to update the indexes somehow when the users selects a new empid or status code?

View 6 Replies View Related

Combine Like Product Fields In Table And Total Quantity For Those Like Fields?

Apr 22, 2015

I have a product table that includes the name of the product, the quantity ordered, and the unit price. This is a summary table for the whole year showing all of the orders. The Primary Key is [ID] from the [tblOrders] table. I attached a screen shot of my query. I don't know if you can see it. I want to generate a report where each product is listed once, the unit price for that product is listed, the total number of that item that was ordered throughout the year, and finally, the total amount spent for each item during the year.

View 2 Replies View Related

Updating Specific Fields In Table 1 With Fields From Table 2

Jul 6, 2012

I have 2 tables.

Table 1: Master table
Table 2: Temporary table

This is my current process:

Every quarter I run a report that pulls loans that meet specific criteria.I export this report into excel (the loans fall into column A)I add a file number and box number in columns B and C.I import the excel spreadsheet to table 2 (they're linked so I don't need to import, it's automatic)

Now that I have the updated information back into the database (table 2), how can I get this information back into table 1? The excel spreadsheet only contains a few loans that need to be updated in table 1. I have tried creating an update query with both tables linked and use the "update to" field. However, when I tried to run the query, it says I have 0 records updated.

My update query is as follows:

Field: Access Bar Code
Table: Table 1
Update To: [Table 2].[Access Bar Code]

Field: Access Box Number
Table: Table 1
Update To: [Table 2].[Access Box Number]

Basically I'm trying to have the query update specific fields in table 1 based on the information from table 2.

View 1 Replies View Related

Colour Changing Fields In List Box

Mar 16, 2008

Hi there guys,

I need a little help on a little situation. Basically, my client for my school project wants to be able to see graphically if orders sent to their bookstore have been processed or not. So i suggested a change of cololour of the fields.

Now I have created a Form containing the orders as they are stored in a list box, (both already processed and unprocessed orders), now I want to be able to allow each item in the list box to be either Red (if unprocessed) or green (if processed) so the user can see which ones they need to deal with. Im guessing this would take some VB, but if anyone could help me, I would really appreciate it :).

PS, if you do provide VB could you please explain a little of whats going on as i have to annotate all the code I use and im not too profficient in VB

Thanks a lot

Dan

View 1 Replies View Related

List Options Based On Other Fields

Aug 24, 2007

Hi,

I've been using this forum for a couple of weeks but this is my first post, so apologies if I've put it in the wrong place!! I have a table with some drop-down lists to fill certain fields, and I would the available list options to change based on information in other fields. To provide an example:

Field One: The drop down list lets the user choose "Alphabet" or "Number"

Field Two: The drop down list lets the user choose A-Z if "Alphabet" is selected in Field One or 1-100 if "Number" is selected in Field One

Hope I've been clear enough. Any help is greatly appreciated!!

Cheers,

Matt

View 3 Replies View Related

Query To List Non-empty Fields?

Nov 10, 2005

Hi...I have the following requirement:

I have a table called "tblselectrso" with the following fields:

stockno rso1 rso2 rso3 rso4 rso5
s1 1 3
s2 2 4 5


stockno is a text field and rso1 through rso5 is a Number field.

Given the value of "stockno" I want to run a query to list all the other fields (rso1 through rso5) that are NON-EMPTY.

Is this possible at all? Can anyone help me please?

Thanks

Please find attached a sample db.

View 2 Replies View Related

Numeric Fields Alignment In A List Box

Feb 2, 2005

While using list boxes i noticed that numeric fields were getting left aligned in the columns. Is there any way to get them right aligned ?

View 2 Replies View Related

Need List Box To Show Different Fields Linked To Same ID

Dec 28, 2004

Hi, I am trying to make a list box that shows the first name of different people in the same family in a subform. I have the first names in different fields linked to the same ID, and the list box I keep making that sort of works will show the whole row of names (but also everyone else's first names down the list), and it will only keep the first name in that row when I select it. I would like to know how to make a list box that just shows the 2 or 3 first names linked to the last name or ID that is currently on the main form I am looking at.

Thanks,

Rod

View 2 Replies View Related

Formating Calculated Fields - SQL & List Box

Jan 6, 2005

Hi,

Is there a easy way of formating/rounding a number returned to a ListBox by a SQL_Query?

I have a List box in a Report that gets it's data from a SQL Query
via ListBox.RowRource = SQL_Statement

this SQL_Statement cointains two calculated fields that returns a number (float)
In the report I get the numbers as float - that is in exponential view (0.29143256234E10) etc
but this makes it difficoult to read.
I have tried multiple solutions and searched the net but still am stuck (exept doing it in a CPU
consuming way).

Is there a easy way of formating/rounding a number returned to a ListBox by a SQL_Query?
I want a result that have a maximum of 3 digits after "zero".

Thx

View 4 Replies View Related

Make A List Of Fields That Aren't Null

Nov 26, 2007

I have a table that has several fields that contain a date if a user is licenced to use a certain piece of equipment and is null if not. Each recor has other data in it such as name, and a unique identifier (numeric). What I want to do is make a list of the fields which have a date in them to create a licence for what they can operate. Any help on which way to go...pretty new at access.

View 14 Replies View Related

How To Update 2 Data Fields From A Drop Down List

Oct 22, 2004

I am an Ms Access newbie and need some help on how to update 2 fields from a drop down list.

The drop down list has 5 columns. The first column is the partname that is bound and updates the table with that partname. I want to take the
listprice which is the 5th column and update a field in the table with the listprice that corresponds to the part name.

Thank you.

View 5 Replies View Related

Right Aligning Text For Fields In List Box Control

Feb 23, 2014

I would like to right align my text for some fields in my list box control. Is there a better list box control out there than the standard one ? how to align the text. The default left alignment doesn't work for all my fields.I tried to search but came up empty.I did try a function "Justify String" I found on the internet This is what I tried .. Call JustifyString("frmExercise","List16",ExerciseTime, 2,True,False)

Here is info from the actual function.

Function JustifyString(myform As String, myctl As String, myfield As Variant, _col As Integer, RightOrCenter As Integer, Optional Sform As String = "") As Variant

View 10 Replies View Related

Seniority List Query With Two Date Fields

Jun 3, 2014

I made a basic Seniority List for my work place using a simple query that pulls info from a main Employee Table. Easy enough using just a simple query with a sort. Problem is, about a dozen or so of the Employee have left and since been rehired. Their Seniority is based on their Rehire Date and not their Original Hire Date. In the main Employee Table I am pulling this info from, there are two Date Fields...

[Hire Date]

[Rehire Date]

Is there a way to build a query where it can check both fields, use the more recent date, then copy the "winner" in a 3rd field?

View 5 Replies View Related

2 Forms On 1 Page. (and Having A List Box Populate A Bunch Of Fields)

Mar 15, 2006

You veterans have probably heard these questions many times, I've had a search around but couldn't find quite what i was after.

This is my first database.

I have 2 tables, one for customer details, and the other is products (holiday packages)

I have made a product form for staff to input new holiday packages. And for the customer form this is also the order form, so a staff member picks up the phone and gets customer details, name, ph, etc and then asks what holiday package they want. I want this to be a drop down list that always fetches all the packages availiable form the product table and when you choose a package it shows all the details on that package.

I need this all to be on the 1 form, if the staff member has to swap back and forth between customer form and product form to get info on a product this will severly hamper productivity.

If my question is abit hard to understand i can take screen shots of my tables/forms to get a better idea. And if someone can really help me finish this database off i'll pay them somethign for there trouble.

Regards, Chris.

View 8 Replies View Related

Tables :: Auto Fill Fields With Drop Down List

Nov 9, 2012

I have a Table named TBLBookings...on one of the fields I have a Lookup wizard thats linked to a Table named TBLVehicles which includes

Car Reg
Car Type
Location

When I run the TBLBooking and click the drop down list it shows up

Car Reg
Car Type
Location

but once the field is clicked all it shows in the records is the REG where in a form id like to see what vehicle it is location etc...is it possible to have extra fields in the form named Car Type and Location and once the registration is chosen it automatically fills in the correct details for them?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved