Displaying Relevant Field Names

Oct 4, 2007

Hi there!

I would like to know whether it's possible to retrieve the field names, in order to display them in table format within a html page. I would like to dress the table with the cell data together with field names as 'headers' for each column.

Here is a snippet of what i have manages to produce. Currently, it displays all the entries that coincide with thier field names. The inly thing i wish to do now is to display the field names:

<html>
<head>
<title>date</title>
</head>
<body >
<h3>Try It Out - Sailors Table With a Counter</b></i></font></h3>

<p><br>
<%
Dim oRSeofc
Set oRSeofc=Server.createObject("ADODB.recordset")
oRSEOFc.Open "People", "dsn=20527796a"
oRSeofc.MoveFirst
response.write "<table border='1'>"

Dim PersonCounter
PersonCounter = 0
Do While Not oRSeofc.EOF
PersonCounter =PersonCounter + 1

response.write oRSeofc.fields.item(counter).name

Response.write "<tr><td>" & PersonCounter & "</td>"
Response.write "<td>" & oRSeofc("PeopleNameFirst") & "</td>"
Response.write "<td>" & oRSeofc("PeopleNameLast") & "</td>"
Response.write "<td>" & oRSeofc("PeopleDOB") & "</td></tr>"
oRSeofc.MoveNext
Loop
response.write "</table><br>"
response.write PersonCounter & " Sailors in this list"
%>


</body>
</html>


All help will be greatefully appreciated, thanx!!

View Replies


ADVERTISEMENT

Displaying Relevant Values From Another Table In A Listbox

Jun 29, 2006

I have a form that functions as information display/update for a table. It also needs to display a list of relevant codes from another table. The codes in the second table have an ID that will match an ID field on the main table. However when I do this I either get every code in the code table, or nothing.

Here is the SQL that I'm trying to use:

SELECT table_code_lookup.code_text, table_codes.code_extra, table_codes.alum_id, table_codes.ID
FROM (table_code_lookup INNER JOIN table_codes ON table_code_lookup.code_id=table_codes.code_num) INNER JOIN table_alumni ON table_codes.alum_id=table_alumni.ID
WHERE (((table_codes.alum_id)=me.id));

However anything I can think of putting for me.id doesn't work. I've written a sub that will modify the query and insert the correct ID num, but I can't figure out how to get it to run when I change records with the record selector.

I have the nagging feeling that I'm missing something totally simple, but can't figure out what it is, where am I going wrong?

View 3 Replies View Related

Forms :: Form Wizard Not Displaying Table Field Names

Apr 25, 2013

Access 2007 Pro.Attempting to use a query and a table to populate a 1:N form/subform using the Form Wizard. The wizard will not display the field names of the query.

View 2 Replies View Related

Displaying Table Names In Dropdown

Jan 22, 2008

Hi,

In our database, we have a table called change_log which is to be filled in whenever someone adds/removes columns from a table in the database or modifies column properties.

One of the columns in the change_log table contains the name of the table which was changed. To avoid typos and misspellings, I would like to create a dropdown which displays all table names in the database. Can this be done programmatically?

Thanks.

View 2 Replies View Related

Modules & VBA :: Use DLookup To Return A Value From Relevant Field

Nov 14, 2014

I have a small table, that only contains one record (and should only ever contain one record, which simply gets edited to suit once in a while).The table is called OtherRates, and the fields are as follows:

WRD_Sat/Sun/BH
WRD_Mon-Fri
AHDifferentia
SKDifferentia
Sat/Sun/BH_OTRate
Mon-Fri_OTRate

I am trying to use DLookup to return a value from the relevant field in this table, however the field to look in is a variable.The code (below) that I have tried returns an error and highlights the DLookup line,.

Code:
Dim WRD
Dim DayType

[code]....

View 3 Replies View Related

Multivalue List In Table - Displaying Names Separated By Comma

Sep 30, 2011

I created a multivalue list in my table. It contains a list of names and a checkbox. I designed the form based on this and am able to check off multiple names. When I go back to look at the table, it stores in each name separated by a comma. So far so good.

When I create a report to display the data, it displays it as 1,2,3..etc., instead of the names separated by a comma.

What do I need to do to display the names ?

View 5 Replies View Related

Modules & VBA :: DLookup - Cost Field To Update On Change To Relevant Rate

Sep 22, 2013

I have a combo box in a sub form with three values, rate1, rate2, and rate3. I have another three fields in the sub form rate1, rate2, and rate3. The rates are dependent on the item. When I select the rate from the combo box I want a cost field to update on change to the relevant rate. I tried this to no avail:

Code:
txtCost = DLookup(cboRate.Value, "tblItem", "ItemID=" & ItemID)

View 5 Replies View Related

Field Names Don't Match Names On Form

Nov 7, 2006

I have a form with several data fields on it. I also have a button on the form that allows the user to duplicate a record . The reason for this duplication is so that if there will be an additional client record for the same customer, but only one piece of data will need to be changed, it's easier to copy the record and then change the one field.

However, I am getting the following message:

"some of the field names you tried to paste don't match fieldnames on the form"

and then not all data in all fields gets duplicated.

I need to figure this out, but am going nuts with it. If anyone has an idea or two they'd care to toss my way, I would be happy.

Thanks one more time, in advance!!

View 1 Replies View Related

Queries :: Using Field List Combo Box To Set Field Names In Query

Apr 24, 2013

I’m developing a claim tracking database that tracks dates of events that occur in the course of processing a claim; such as, Loss Date, Report Date, Estimate Date, Payment Date, etc. There are 16 different “Events” in all.I currently have the following tables set up:

tblClaim
ClaimID
ClaimNumber
fkEmpID

tblEmployee
EmpID
EmpName

[code]....

What I need to do is create a form where management can choose two or more events, and calculate the average number of days between two of any of the events, for an employee, or all employees.I have created a crosstab query to change the values in the EventName field in tblEvents to field names, and the EventDate as values for the related EventNames. I created another query based on this query to do the DateDiff.

I created combo boxes on my form with the Row Source Type set to Field List, for a list of fields in my crosstab query. I’ve tried to use the following DateDiff function to get the days between the two fields selected in my combo boxes:

Code:
DateDiff("d",[Forms]![frmReportBuilder]![cboEvent1],[Forms]![frmReportBuilder]![cboEvent2])

But I get an error about unrecognized field name or expression for my combo boxes. So I added my combo boxes in the query parameter window, with a data type as both text and value, but with both I get an error “This expression is typed incorrectly or is too complex to be evaluated.” I also specified the column headings in the crosstab but I still am getting the “too complex” error.I’m pretty sure it’s trying to do a Datediff on the literal values in the comboboxes and not recognizing that I’m trying to specify field names.Is it possible to assign field names in DateDiff this way?

View 1 Replies View Related

Relevant Data Not Cascading Through

Jun 14, 2005

As part of my data structure I have a Fault table, Transaction table & Resolver table. The Resolver's are dependant on the Transaction that are selected in the fault table. What I am after (and it's not happening) is when selecting a Transaction in the Fault table the only resolver that is available to the user is the one related to the choosen Transaction.

At the moment after selecting a Transaction all Resolver's from the Resolver table are available. When creating my Fault table I selecting the Resolver field as a Lookup and choose the Transaction table and the Resolver field.

View 1 Replies View Related

Field Names

Oct 31, 2006

If 2 tables have a field named 'EmployeeID' (for example), are you screwed when it comes to queries and vba, as far as selecting fields / specifying data goes?

Thank you!

View 3 Replies View Related

Field Names

Jul 27, 2006

I need an opinion. I'm new to access so I'm really lost I have to create a database consisting of 20 clients. Then they gave me 4 steps I had to accomplish:

Create a total of all account balances, so the total number of recievables are known.

For each account, calculate the number of days each balance has been outstanding.

Classify the account into 4 groups three late (30,60,90 days overdue) and one current (under 30 days), Total the amount of outstanding recievables for each catagory.

Sort using number of days balance is outstanding as primary sort key and outstanding balance as the second sort key.

My question is should I make a field called Days overdue and a separate one for outstanding balance. It also seems they want me to do calculations in the table. I thought that was not an excepted taboo? Are the 4 goals possible to accomplish in access? Please give me some help!

View 2 Replies View Related

Insert Relevant Value Based On Selection

Jun 15, 2005

I have a form with a combo box this combo box looks up values in my STC table. The STC table has two fields STC & Resolver and each STC has a unique associated Resolver. What i want to happen is after the user has selected the STC from the combo box on the form the associated Resolver be displayed in a textbox on the form. I am ussing the following code but nothing seems to be happening:

Private Sub cboSTC_AfterUpdate()
Dim ResolverSource As String

ResolverSource = "SELECT tblSTC.[Resolver] " & _
"FROM tblSTC " & _
"WHERE tblSTC.[STC]='" & Me.cboSTC.Value & "';"

Me.txtResolver.RowSource = AgentSource
Me.txtResolver.Requery


End Sub

View 1 Replies View Related

Missing Field Names

Nov 15, 2005

Just used the code below to output to .csv. however Field Names have been omitted from the output .csv file.

Can anyone help?

Thanks

Paul

Private Sub export_Click()
On Error GoTo Err_export_Click
Dim AString As String
AString = "Export_Occupancy_"
DoCmd.TransferText acExportDelim, "", "ChildCare Vouchers For Accor", "c:\Temp" & AString & Format(date, "YYYY_MMDD") & Format(Time, "-HH_MM") & ".csv"
Exit_export_Click:
Exit Sub
Err_export_Click:
MsgBox Err.Description
Resume Exit_export_Click
End Sub

View 2 Replies View Related

Export Field Names

Jun 22, 2007

I need to capture the field names from a linked table and copy them into an excel spreadsheet. Does anyone have an idea how I can accomplish this?

Thanks.

View 3 Replies View Related

Export Field Names Etc.

Apr 25, 2005

Hi,

I have succeeded (with some help from this site!) in creating a clinical database for the Diabetes Care team in our hospital. Now, our IT helpdesk staff want me to list the field names and data types. The design view of the tables seems to contain everything they need, but I have tried everything and cannot find a way to paste this info. out into any other format, Word, Excel etc. Has anyone ever managed this or is there something else I should do?

View 2 Replies View Related

Prefix's For Field Names

Jul 15, 2005

I have been looking at the way I name fields and thought I'd Google the topic. Seems to be a split as to prefix names or not. Looks like the SQL Sever and Oracle groups say not to while Access users are kind of directed to use them...

While I have not prefixed names in the past, I was going to do my next db with the things like:

intMyFldName
strMyFldName
etc...

Where as in the past I would do something like:

my_fld_name_one
my_fld_name_two
etc...

What do you all see as some of the pro's and con's?

View 11 Replies View Related

Field Names In List Box

Jun 16, 2006

I would like to have a listbox that contains all of the fields names from a table. Since the user will be selecting items from this list box, the field names should be referred to by their captions as defined in the table.

The listbox values will change depending on the value selected from another listbox.

Question: using code, how can I fill a list box with field names and display the field caption?

Thanks!
Lisa

View 1 Replies View Related

Access Field Names

Nov 2, 2004

I'm getting the following error :

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Description One LIKE '%flip%''.
/sbs/search_prods.asp, line 22

I know that it's becuase the field name is Access is "Description One" as opposed to "DescriptionOne" or "Description_One".

The problem is that I can't alter the actual DB table (it is part of another system that I'm attempting to integrate the site with). Is there anyway to write a query statement that will allow for field names to have spaces in them?

Thanks!

View 2 Replies View Related

Changing Field Names

Dec 14, 2005

I am using ASP to try to edit the column (field) names of my Access database. Here is an example of would I would like to work:

Code:data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("databases/logins.mdb")Set rs = Server.CreateObject("ADODB.Recordset")rs.CursorType = 2rs.LockType = 3 rs.Open "SELECT * FROM Users;" , data_sourcers(1).name="blah"

The last line is the problem. A field name in an ADO recordset is limited to read-only persmissions for opened (already exisiting) recordsets.
link:http://www.w3schools.com/ado/prop_name.asp

Is there another way around this without using an SQL "ALTER" statement. In other words, by accessing the field's name through a number like rs(i).name instead of rs("fieldname").name?

Thanks.

View 1 Replies View Related

Rename Field Names Using VBA

Mar 14, 2006

Hello, I'm currently working on automating the import of a csv file (which works fine using the Transfertext method) but the csv file does not contain field names.

I want to rename the fields with something meaningful after importing the file, but I can't seem to figure out how to do this using the tabeldef method of handling tables. There's nothing in the help, not that I could find anyway.

Does anyone know whether this can be done and how, cheers.

View 4 Replies View Related

Automatic Update Of Information In Relevant Fields

Sep 20, 2007

Morning everyone

I have made up a database to record generations of birds; along with others I have the following fields:

Ring number (primary key)
Sex
Year
Colour

Data entry via a form view.

For new entries I pick up from a combo box the parents, what I need to do now is create a relationship between 1, 3&4 and 2, 5&6 so that the data will automatically slot in the relevant fields.

1Parent Cock
2Parent Hen
3Grand Parent Cock C/S
4Grand Parent Hen C/S
5Grand Parent Cock H/S
6Grand Parent Hen H/S

would I do it via a query. And would one cover relevant generations

Thanks for any help

Norma

View 8 Replies View Related

Making Forms Show Relevant Records

Apr 3, 2005

I have been able to successfully solve the problem of my pages showing relevant records by using form control.
How should I make my form display a new record everytime I open it? So, that when a lame user opens it , he wouldnt change the existing data on an existing record. How to solve this problem?
Kindly help. thanks

View 11 Replies View Related

Changing Field Names Automatically

Oct 15, 2005

I have an Application that I want to re-use for a second user. The only change I need to make is to re-name the fields.

Is there a tool that can do this across the tables, queries and reports for each field name change ???

View 1 Replies View Related

Same Field Names For Bound Controls

Jul 14, 2005

is there any problem with fields in differnent tables that have a field name that's the same? My concern is the control source for a bound control. Access can keep track of this if a few of these similar field names are on the same form and bound?

scratch

View 3 Replies View Related

Linked Field Names/Columns

Aug 16, 2007

Hello,

I am trying to make a new form with the same info as another but in a different view for easily updatable forms/reports. The current table i have looks like this:

Company Product Market Available?
1................1................2..........yes
1................5................2...........yes
2................1................1...........yes
2................2................6............yes

etc... with the numbers linked to tables with the actual name.

what i want to do is make a table with field names that correspond the different products so that it looks like this:

Company Market Product 1 Product 2 Product 3
1.............2............yes..........yes....... ......no
2.............1.............yes.........no........ ........yes
1.............4..............no.........no........ ........yes

Ive played around with crosstab queries but I'm not getting the results i want. Is there any way to have this new table linked to my first table so that if theres a new product # entered it will automatically make a new column on the new table and fill it in? Let me know if this is too confusing, Thanks for your help.

View 5 Replies View Related







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