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
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?
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.
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?
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:
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,.
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.
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:
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.
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:
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?
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.
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?
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!
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
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?
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?
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?
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?
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?
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.
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
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
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?
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:
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.