Dynamically Adding Multiple Columns Question

Nov 12, 2005

I coulnt figure out how to reply to a reply. This is a follow up question to a previous post.

I can now create a new column in my access db through my web form.

Here is the script:
ALTER TABLE FAQ ADD City varchar(30)

this adds a new column called city.
Here is my problem:
Every time a user asks a question, that question will be in the new column created.
I need the newly created columns to have unique names.
I tried creating a form with a text file (to simulate where they type in their question) then post to post.asp.
post.asp holds the script.
I replaced city with ::T1:: (the variable of the text file), but got an error.

Creating columns dynamically is worthless unless there is a way to make the column names unique.

Can anyone shed some light on this problem for me?

Much appreciated

Mike

View Replies


ADVERTISEMENT

Adding Extra Columns Dynamically

Mar 5, 2007

Hi

I have 120 tables, each with the same name except 2 identifying characters at the end eg pc_dist_ab, pc_dist_al
Each table currentnly has 3 columns.
I would like to be able to add 2 additonal columns to each table with one query and was hoping an alter table query where the table name matches pattern would have worked but evidently not.

Is there a way to build some sort of dynamic query to add extra columns to these different tables at the same time?

To save another post I guess Once this is done I would then like to create 1 main table by creating a new table and appending all the files together- again I would prefer to be able to run this once.

I'd appreciate any help/thoughts as to whether this can be done?:confused:
Thanks

View 1 Replies View Related

Modules & VBA :: Map Columns Dynamically

Mar 16, 2014

got the following issue:

There are two tables A und B.

Table B contains columns like 1FC, 2FC,...., 12 FC

standing for forecast sale quantities.

Now I want the user to decide how many FC columns he wants, always starting with 1FC.Let's say he wants three FC columns.Now I want to map these 3 FC columns to the table A. Both tables contain column Product_Classes.Can I shrink table B to the 3 FC columns ?

View 3 Replies View Related

Extract Value Only For Few Columns Dynamically From Result Set

Aug 4, 2012

I have table with following Columns:

Banker
Status
Week1

Week2
Week3
Week4
......
Week48
Week49
Week50
Budget
YearMonth

I need to extract the value only for few columns dynamically from result set. I have written following code for the same:

Code:
i = 0
strColumnsSQL = "Week" & CStr(gsReportingWeekNo)
Do While i < 4
i = i + 1
strColumnsSQL = strColumnsSQL & ",Week" & CStr(gsReportingWeekNo) - i
Loop

[code]....

View 1 Replies View Related

Reports :: Dynamically Include Columns Based On Check Box

May 28, 2013

I have a report with many columns in the detail listing data, and their associated titles above in the page header.What I would like to accomplish is the ability for the user to check boxes off on a form which will remove/add specific columns to the report. The form will essentially be a "build your report" style, with a button on it opening the print preview of the custom report.

Im assuming this is accomplished by the "on load" part of the form through VBA. How is the sizing handled? If the user un-check's a box to remove a column of data, how is the header and detail data "moved over" or re-arranged to accomplish a relatively decent looking layout? Any example or example code to deal with one column/setup (which I can copy and modified)??

View 4 Replies View Related

Adding Controls Dynamically

Dec 9, 2005

I have a form that has several rows of controls (comboboxes, textboxes, checkboxes, etc)

Each row is exactly the same. There is one row for every 'driver' in the 'SalesDrivers' Table.

Instead of manually adding a row when we add a new driver I would like to form to dynamically create the form based on the drivers in the table.

Any suggestions?

View 6 Replies View Related

Forms :: Adding Page To Tab Form Dynamically

May 24, 2013

I would like to add a page to a tab form when a certain button is clicked. I don't want to use the visible/hide solution. So I already found out that this can only be done in design view. I am using the following code:

Code:

Private Sub cmd_StrategyAdd_Click()
DoCmd.OpenForm "Form1", acDesign
Me.tabMain.Pages.Add
DoCmd.OpenForm "Form1", acNormal
End Sub

I am getting the error: Run-time error 2467. The expression you entered refers to an object that is closed or doesn't exist.I am sure the name of my tab form is tabMain.

View 14 Replies View Related

Forms :: Adding Entries To Shortcut Menu Dynamically

Jul 26, 2013

I am using Access 2003 and have a custom shortcut menu. I wish to add some entries to this shortcut menu dynamically.

Background : I am displaying a list of customer orders and wish to offer the user the facility to filter the search for one item instead of the default of ALL.

The dynamic entries would be the unique order item reference nos. retrived for that particular customer retrieved via recordset . So the menu would show :

ALL
------
Model 1
Model 2
Model 3
etc.
...

How am I able to add these entries to the menu, the selection text will be the filter text I use to report upon.

View 11 Replies View Related

General :: Dynamically Adding Option Controls To A Frame On A Form

Aug 20, 2012

In Excel, I can dynamically add option controls to a frame on a form using the Control.Add method. Is there an Access Equivalent? I can only find Count & Item as Control. items.

It might have something to do with design view i guess.

View 5 Replies View Related

Forms :: Dynamically Search Multiple Fields

May 13, 2014

Im trying to make a find page that looks up 7 fields and after reading about the Dynamically search multiple fields i downloaded the sample and changed a few things. But I have a few problems .

1) If you open the FRM_SearchAll from the navigation pane , it will not show the detail form by dbl_click or view button also will not show the picture .

2) If you open it the navigation form , it has the following error
Forms!FRM_SearchMulti!SrchText before you start it.

3) As above it will not show the detail form by dbl_click (it has Error)
Run time error : 3075
Syntax error (missing operator) in query expression '[Food]Snack a Jacks'.

4) If you try to view detail form with the button (the error comes up)
Syntax error (missing operator) in query expression '[Food]Snack a Jacks'

5) also will not show the picture .

View 3 Replies View Related

Modules & VBA :: Dynamically Search Multiple Fields

Sep 2, 2013

I want a search box on my db that will locate data from certain fields within my database. Today i came across the posting by John Big Booty with the above title and what he has done is exactly what i require.

Now i have followed all instructions to the letter however i keep getting an error which i have attached ......

View 4 Replies View Related

Forms :: Dynamically Search Multiple Fields

May 21, 2014

The code currently works for searching data on ONE single table.What if I wanted it to search data simultaneously on TWO similar tables? I was messing around trying to build up a query that uses both tables but it failed.

View 3 Replies View Related

Queries :: Consolidate Multiple Columns Into Two Columns

May 14, 2014

I have a MS ACCESS 2010 database with a data table which i am trying to create a query from. I have 6 columns of data( one with an ID Field and 5 Name Fields). Below i have made examples of how it first appears as a simple query and the second will show you what i would like it to look like.

What the simple query looks like: [URL] ...

Second what I want the query to look like: [URL] ....

View 2 Replies View Related

General :: Dynamically Search Multiple Fields Using Customer Data?

Feb 19, 2014

"Dynamically search multiple fields" using my own customer data.

I'd like to add in additional searches as what he has will let you do one search but I'd like to, in his example, search on vintage and state, or the like. I assume Id need two multi-searches for this.

Right now the data is in excel so I have a completely blank page to fill.

View 2 Replies View Related

General :: Ability To Dynamically Update Multiple Docs / Files

May 31, 2013

Lets say we have 100 documents. 30 of these documents contain the same exact set of instructions that i want to update/change. what options would i have that would allow for this 'mass update' so that i can change that specific instruciton and every document with that line would be updated to reflect it?

View 4 Replies View Related

General :: Dynamically Search Multiple Fields From Combo Box On Form

Mar 21, 2013

[URL] ....I am trying to dynamically search multiple fields from a combo box on a form that includes a subform. I am using code from the above referenced link within this forum.

It works without the "setFocus" for the Listbox except it jumps to a record after the very first character is entered instead of narrowing down as characters are typed. If I leave in the "setFocus" I get run-time error 2110.

View 14 Replies View Related

Adding Columns Of Two Tables

Mar 9, 2005

Hi..I have three tables A ,B and C, which have fields A,B and C respectively.
I want to do that following default calulation

A.a=B.b+C.c
meaning adding two columns of different tables and storing it in a third column.
It works for me in the forms but I want to do that in the table.
Is there any way to go about it


Regards
Rahul

View 1 Replies View Related

Adding Columns To Tables

Feb 14, 2006

Background info: I have created a database that consists of 22 tables that contains hundereds of electronic components seperated by type. In each table are columns for evey project so that i can determine what projects each component is used in.

Everytime there is a new project i need to add the new column to every table. Is there a way to add the column to every table in one step rather than having to do it seperately for each table? Every table set up the same, same number of columns and column titles and everything.

Thanks

View 14 Replies View Related

Adding Columns With Fixed Value

Nov 27, 2007

I have a query that gives me a table with one column, say column A.
I need to add 2 columns to the table and the coulmns will have fixed value.
So I need to add column B and column C to my table and all rows in column B will have a fixed value and all rows in column C will have a fixed value.

What I have:
Table with one column
Column A
a
b
c

What I need:
Table with 3 columns:
ColumnA Column B Column C
a 12 14
b 12 14
c 12 14

Any help will be greatly appreciated.
Thanks

View 1 Replies View Related

Adding Up Columns Of Currency

Mar 24, 2006

when i am creating a query and need to be adding up all the data in the field, such as with the price needed to be paid overall the items, what do i have to do to create a part of the query or report to do this automatically for me? basically its a huge column of numbers that need to be simply added together and a grand total taken. please someone help. cheers.

View 3 Replies View Related

Adding Up Columns Of Currency

Mar 24, 2006

when i am creating a query and need to be adding up all the data in the field, such as with the price needed to be paid overall the items, what do i have to do to create a part of the query or report to do this automatically for me? basically its a huge column of numbers that need to be simply added together and a grand total taken. please someone help. cheers.

View 2 Replies View Related

Adding Two Columns That Both Contain Zeros

May 16, 2007

I have to add the row data in two columns together. I used

val([COLUMN 1])+val([COLUMN 2]) and it works unless one of the columns has a zero in it. For example if column 1 is 25 and column 2 is NULL it runs the query but puts a #ERROR in those rows. Please help.

View 8 Replies View Related

Error While Adding Two Columns....

Feb 21, 2008

Hi guys, Excuse my novice questions.
I have a query in which i did two things: defined a Column "Line Item Cost " as Sum ( using the dropdown in Design Grid of the query).
Then i calculated another field: Expr13 which is:
Expr 13: Sum([Line Item Cost]+ [Change Request Total Cost])

So, If Line Item Cost = 1363000 and Change Request Total Cost = -40000, then
Expr13 : 1363000-40000 = 1323000, but i am getting the values: 1283000(Somehow the value is getting doubled before addition)

Please look at the attached Document.
Please Help!

Thanks,
Kon

View 2 Replies View Related

Adding Aggregated Columns

Aug 27, 2005

Hey,
How can I add an aggregated column to an existing query?
For example:
I have 3 fields (a, b, c), each holding numbers. I want to add a fourth field which will average or use any other aggregated function on the 3 fields (but not by doing it manually).

View 1 Replies View Related

Adding New Columns Of Sign

Oct 14, 2013

I have table with one of the columns with number (amount) that can be positive or negative.

I want to add new column of sign - 'H' for positive or 'S' for negative.

View 1 Replies View Related

Currency Columns Not Adding Up

May 6, 2014

I have a sharepoint list linked into my access database and every time when I work with queries and try to add up them up it causes the information to display in a text string. What to do in order to resolve this issue. For example, instead of $1,000+$5,000=$6,000 it will show 1,0005,000 as one string but not add them up.

View 2 Replies View Related







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