Obtaining DSN List

Dec 7, 2005

Hi All,

Long time no see y'all...

Question: is it possible to obtain a list with all the Access based System or User DSN entries on a system? First I don't know how to get such a list at all, and second I don't want to bother the users with non-Access entries - they're confused enough as it is.

Any help appreciated & regards,

Michiel

View Replies


ADVERTISEMENT

Problem With SQL Obtaining MsysObjects

Sep 25, 2005

Hello,

I've got a workaround for the SQL of obtaining a count of tables matching a certain name-style. Ideally, I want to use the Like function (sql2) as it codes more simply, but found that the query doesn't work. As a workaround, I rewrote with a string comparison using the Left function sql1.

My question is: What is wrong with sql2?

When I paste the SQL into the Query Designer it works, yet when I debug in module code form, it fails.

Any ideas?

Regards.



Private Function getTableName(strName As String) As String

'---------------------------------------------------------------------
' Purpose
' This function is used to create a new table name. First it looks up
' all the table names in the database matching the passed in variable
' name, and then returns an incremented version of the name.
'---------------------------------------------------------------------
' Returns
' Table name as string.
'---------------------------------------------------------------------

Dim sql1 As String, sql2 As String, rst As New ADODB.Recordset, n As Byte

' Get number of characters for passed-in variable.
n = Len(strName)


sql1 = "SELECT Name FROM MsysObjects WHERE left(Name," & n & ")=left('" & strName & _
"'," & n & ") AND (Type=1)"

sql2 = "SELECT Name FROM MsysObjects WHERE (Name Like '" & strName & "*') AND (Type=1)"

rst.Open sql2, CurrentProject.Connection, adOpenKeyset

Debug.Print sql2
Debug.Print rst.RecordCount

If rst.RecordCount >=1 Then
getTableName = strName & rst.RecordCount + 1
Else
getTableName = strName
End If

rst.Close
Set rst = Nothing

End Function

View 9 Replies View Related

Obtaining User Information

Dec 10, 2007

Hello to you all...

I am just after a bit of assitance if anyone can kindly help?

Basically, I need to redevelop a Complaints database for my employer as the current one is no longer fit for purpose. The current database is a FE/BE database and users are required to login with a username and password. This causes me a massive headache as users constantly forget their password and email me to reset it. I had included a password reminder form which emailed users their password if they got their pre-defined security questions correct but our business standards dept did not want us to store personal data for the reminder questions. Is there a way that the database can obtain the users network login ID from windows without too much difficulty?? We had something similar in a previous database but it dipped into the system registry and our IT dept had a fit when the found out....not surprisingly. :-)
Thanks people. Have a great day!

View 4 Replies View Related

Obtaining Latest Price Data

Jul 23, 2007

Hi,

I have a table containing the following fields;

ProductID (UniqueID)
Date
Price

Each day some, but not all, of the products in this table have their prices updated.

When I write a query how can I ensure that the latest price is recalled ?

Any tips greatfully received.

View 2 Replies View Related

Queries :: Obtaining 3 Separate Totals In One Query?

Jul 22, 2014

I have three tables A, B and C.

I want to build a query that displays three separate totals: Total of A, Total of B and Total of C.

When I try to do this, the query has a weird behaviour summing the totals of the totals of the totals, and I don't know why .

I'm attaching a really basic sample of what's happening, where totals SHOULD be $4, $8 and $16 instead of $16, $32 and $64.

View 14 Replies View Related

General :: Obtaining Creation Date Of Excel File

Apr 10, 2014

I want to use the create date of a file which is stored as a linked table in my Access 2010 database. I have attempted this by creating a query (qrysysObjects) using the MsysObjects and that gives me the filename of the linked tables, well almost - a few are csv files and this does not have the file name in the database field text, but I have found it in the foreignname field except it is name#csv rather than name.csv so I can't simply concatenate this in a query.

I know there is a function called FileDateTime which you can use in vba or a query but can you use a variable with this rather than the actual path name? I tried this in the query qrySysObjects but it said unknown function.

View 2 Replies View Related

Obtaining Multiple Report Parameters Via Menu Form Lookup Control

Feb 11, 2015

In our Student Administration database, we have a Student Evaluation Report which prints a 1 page per student report in memo like format. The instructor had previously input rating numbers (4=Best, 1=Worst) for 9 categories for each student via a database form into the Evaluations Table.

Two other elements of the rating are an Attendance based on number of days absent and a Grade Point Average (GPA) calculated from the student's test scores. The instructor then prints and reviews the report with each student.

There is an Evaluations Parameter table which has the following fields:

Field
Description

ID
The autonum key field.

Class
eg., 2015-1

Evaluation Number
A single digit (eg., 1, 2). There may be more than 1 evaluation for each class.

EffectiveDate
The "as of" date of the evaluation.

There are then several other tables that are input to a query that will be the record source for the report:

Table
Purpose/Data

Students
Student Name, Class

Absence
Has a record for each student's absence with date and a 1 or .5 indicating a whole or half day absent.

Test Grades
Has a record with each student's test results with date and score.

Evaluations
Holds the rating score for each of the 9 rating categories.

The Student Evaluation report is launched from an unbound Reports menu form via a button. On the Reports menu form I wish to have controls for the user to select which evaluation to report on. The Absence and Test Grade information needs to include records that are <= the EffectiveDate in the Evaluation Parameter table. The Evaluations records need to match the Class and Evaluation Number in the Evaluations Parameter table.

I would like the user to be able to select the Evaluation Parameter via a combo box vs. specifying the Class, Evaluation Number and Effective Date separately and then have the query record source for the report use those two fields as criteria. But my limited understanding of the Combo box indicates that only 1 field from the lookup query of the Evaluations Parameter table can be stored in the control whereas I need 3 (Class Evaluation Number and EffectiveDate).

How the user can select the desired Evaluation Parameter record on the Reports menu form and use the 3 fields from the selected record as criteria in the report's record source query.

View 10 Replies View Related

Queries :: Using Variable In A List Field Query - Getting Complete List On Initial View

Mar 28, 2014

In my access form I provide the user a list of locations from various countries in a listbox . But the list is too long so I provide him a combobox for selecting a country. Selecting the country should update the listbox showing only the locations in that specific country.

So my SELECT from the listbox must cover the unselected state and show all entries and when a country is selected it must narrow the selection.

I tried to get this happen with the following SELECT statement containing a variable. Choosing a country in the Combobox results in a change of the variable and in a requery. This works after the first country is selected and for each country change, but the initial list is empty.

VBA in the loadform
'Application.TempVars.Add "varcountryselect", "*"
SELECT in the listbox "lstlocationsperproject"
SELECT tbllocations.locationID, tbllocations.country, tbllocations.localstreet, tbllocations.localcity FROM tbllocations WHERE ((tbllocations.country) Like [TempVar]![varcountryselect]);

VBA in the combobox
Application.TempVars("varcountryselect") = [Form]![kombcountryselect].Column(0)
Me.lstlocationsperproject.Requery

The values in [kombcountryselect].Column(0) are texts like "SPAIN", "MEXICO", etc.

Any hints, how I have to use the * for getting the complete list on the initial view ?

View 5 Replies View Related

Create A Randomise List From A Table And Save The List For Each Month

Dec 14, 2006

Hi All a newbie here so any help will be appreciated,

sorry for the long post but trying to give you all the information you might need.

I wrote a basic access database for my Church to aid in a paperwork audit for a charity food drop which we do monthly to give free food to the needy.

But each month it gets harder to find out who was in line first so I thought with all your help we may be able to randomize the names each month in a different order as to avoid confusion and also avoid people waiting in line as they turn up at 5am and we don't start until 9am.

So if this will work in access they can all come for 9am

I don't mind creating a new database and adding the additional information, if that's what it would take.

My Background I have created basic databases from scratch not using wizards, But I don't know much about code or how to implement it so any help in where code goes it would be very much appreciated.

Database details (Microsoft Access 2002 version)

Table Name = details
Field name = ID (auto-generated)
Field name = FirstName (text)
Field name = Surname (text)

If possible it would be nice to keep a record of the randomized lists (in the database somewhere ?) each month in case anyone wants to see it or disputes the lists, where I can just create a report to show the details.

There will be approximately 90 to 125 names.

Thank you in advance for all your help in this matter

Britgent

View 1 Replies View Related

Reports :: Exclude Individuals From False List If They Are In True List

Jul 15, 2013

I have created my tables and form and am now trying to run reports to organize the data. I have figured out how to group the individuals by group and treatment, but can't figure out how exclude individuals from the final list if they are already in another. As background, some of the individuals are eventually excluded from the experiment, though I keep the initial data. When the exclude individual checkbox is checked ("True" on the report) I do not want the individual to be listed in the "False" list, even though there are entries for that individual when that checkbox wasn't checked (when it was "True"). This is so I can get an idea of the current totals in each group.

Implant Period
>Treatment
>>Exclude individual?
>>>Individual ID

I feel like this should be a fairly simple task, but I cannot figure it out... Maybe there is coding to exclude individuals from the "False" list if they are already listed in the "True" list?

View 4 Replies View Related

Use Multi-select List Box To Filter A Report With Two List Boxes

Nov 20, 2013

Allen Browne's "Use a multi-select list box to filter a report" solution, in particularly with two multi-select list boxes? The code works fine for me for either box so long as I code it for one box alone. Combining the two into one code results in a type mismatch error. I'm trying to use the code to pass the contents of both multi-select boxes as Where conditions to a report. Both boxes are based on number fields. To try to isolate the problem, I've removed Allen's setDescription and OpenArgs conditions. We're unfortunately still on Access 2003 as the company desires to squeeze every dime by using until end-of-life next year.

Code:
Private Sub cmdPreview_Click()
On Error GoTo Err_Handler
'Purpose: Open the report filtered to the items selected in the list box.
Dim varItem As Variant 'Selected items

[Code] .....

View 14 Replies View Related

Created List Box With One Column - Display All Characters Of List Item

Jan 2, 2014

I have created listbox with one column (contains one column only), now i would like to display all the characters of list item (want scroll bar to listbox).

How do i display all text of list item, I have already fixed Column Widths to max length (22";0.1"). However when scrolling to right, it is going to next blank column of list box, which is created only to change Column Widths property.

View 12 Replies View Related

Queries :: Return List Of Records From Original List

Apr 23, 2013

I'm looking to move an excel sheet to access because the row counts are too much.The main thing it does is compare the supplied data against a list I hold in the sheet.There are not duplicate records, however..Some data is a direct lookup for a full match, but much of it is a count to see how many records contain a certain string.

I have 500 keywords which have a countif function in using wildcards.I need to create a query/report which will return a list of records from the original list which contains each keyword featured and how many times it features.I was going to do it in PHPmysql but the time it took to parse a million records for every keyword made it pointless.

eg:
keywords:
look
billy
magic

list:
"have a look and see"
"spanish dave"
"who is billy brag"
"looky looky I go hooky"
"who's the man from argentina"
"could it be magic now"

my spreadsheet would return a 1 next to ""billy" and "magic" and would put a 2 next to "look".

the sheet has the keyword in each row and next to the column:
=COUNTIF(list,CONCATENATE("*@",B13))
where "list" is the external data.

View 3 Replies View Related

How To Transfer Multiple Select Item In List Box To Another List Box

Jun 2, 2012

How To Transfer MultipleSelect Item In Listbox to another Listbox ?

View 7 Replies View Related

Select From List BOX Of List Of Choices And Store This Into A Table

Aug 21, 2013

I created a form and created on it a list box which is a query that grabs certain number of fields from different tables. I would like the user to select from this list box of a choice and then store their selection into a table.This list box has three fields, but it needs to store the id rather than the item, the user would see the name of the item but the id of the item would be store into another table, called bid. It store all these three fields when a user selection one of the item from the list.

View 13 Replies View Related

List Table, Limiting Field List..

Oct 14, 2006

Okay,

The subject is probably confusing but I'll try to explain.
Setup:

Table1
FieldID = Number
FieldName = Text

Table2
FieldID = Number
FieldName = Text
T1_ID = Number

Relationship
Table1.FieldID 1-> * Table2.T1_ID (one to many)

Now, I'm trying to create a 3rd table that has field populated by Table1 and a field populated by Table2 but I want to limit the field populated by table2 by what is selected in the field populated by table1.
Table1:

1st
2nd
3rd
4th

Table2:

1st,January
1st,February
1st,March
2nd,April
2nd,May
2nd,June
3rd,July
3rd,August
3rd,September
4th,October
4th,November
4th,December


Table3:
Table1Field = Number, ComboBox-Source: Table1, BoundColumn=1
Table2Field = Number, ComboBox-Source: Table2, BoundColumn=1

If Table1Field = 1st then
Table2Field Will only allow January, February, or March as selections, since ONLY they are a member of the "1sr" group via the table1 list.

Is this possible, or do i have to do some run-time checking or something?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner

View 1 Replies View Related

Forms :: List Box - Selection - Populates Next List Box

May 20, 2013

I am wanting to preempt data in list boxes

listbox1
Fruit
Vegetable

listbox2 (If Fruit Is Selected)
Apple
Banana
Orange

listbox2 (If Vegetable Is Selected)
Potato
Peas
Carrot

If Fruit is selected in Listbox1 - Then Listbox2 should have the options
Apple
Banana
Orange

If Vegetable is selected in Listbox1 - Then Listbox2 should have the options
Potato
Peas
Carrot

View 12 Replies View Related

Forms :: Blank List Box Defaults To First Name On List

Feb 2, 2014

I have a Form that links to a List Box which pulls from a combined (concatenated?) list. The list it is pulling from appears as follows: SELECT [Rank]+" "+[Last Name]+", "+[First Name] AS Expr1 FROM [T_Personnel Information]; My issue is that the Field in the Form that pulls from the Field in the Table defaults to the first name on the list when left blank, where as I want it to default to a blank value unless I select a name from the list.

View 1 Replies View Related

Forms :: Filter List Box From Other List Box Selections

Jul 15, 2015

I have a form with 2 list boxes, part number and modification. There is a subform containing another list box that is supposed to show the part information (bpn,vendor,status,etc.) that corresponds to the selected part number/modification in the parent form list boxes.

The part info list box has multiselect enabled and what i want to is be able to select multiple line items and press a button which then sets all of the selected line items status to "Request Removal". This is my code for the button:

Private Sub removeButton_Click()
Dim varItem As Variant
With Me.acbModList
For Each varItem In .ItemsSelected
MsgBox (Me.Status.Value & Me.[Part Number].Value)
Me.Status = 6
Next
End With
End Sub

The msgbox was for debugging purposes. Here's my issue; the for each actually does iterate through each selected item but the value for the line item doesn't change along with it. For example, when I selected 3 items, the msgbox will pop up 3 times but each time will have the same information (first item in the table) even when that item isn't selected.

My next issue is that I am receiving an error message with "Me.Status = 6" stating "You cant assign a value to this object". 6 refers to the id of the status i want to set it to.

View 4 Replies View Related

How To Populate List Box With Another List Box Using Extended Multiselect

Nov 23, 2012

How to populate a list box using another list box on the same form. I have this working completely fine if the the source list box has the multi select property configured to be off, however I need it to be set to extended multi select.

View 1 Replies View Related

List Of Manufacturers & A List Of Their Distributors

Aug 12, 2005

I have a list of manufacturers & a list of their distributors. The relation is many to many. How to build one or two tables & to select correctly the primary key.

Thanks

View 1 Replies View Related

Forms :: Using One Dropdown List Box To Display A Selecting In Another Dropdown List Box?

Aug 4, 2014

I have a form where I have two drop down list box.The first list box is called Transaction_Type. It contains three values: Created, Allocated and Sold

The second list box is called Product_Status. It contains 6 items: Allocated, Produced, Reworked, Shipped, To Be Produced, Unallocated.

I have a products form. When a user created more inventory they will selected in the drop down list create, then a quantity. Then I would like the status of the product to update to "Unallocated".

When the user placed an order but doesn't finish it they will choose the status of the inventory to be allocated so I would like the product status to be updated to allocated automatically.

They other status the user will choose them self and do not need to be linked to each other.

In my vba code I have tried with the OnClick and AfterUpdate sub procedures with the following code.

If Me.Transaction_Type.Value = "Created" Then
Me.Product_Status.Value = "Unallocated"
End If
If Me.Transaction_Type.Value = "Allocated" Then
Me.Product_Status.Value = "Allocated"
End If

Yes when i select "created" from the drop down list it does not change product_status to say "unallocated"

(in using access 2007)

View 14 Replies View Related

Query To List Multiple Records In A List From Multiple Queries

Jul 11, 2013

I have a DB where you there's 5 tables all linked together by one project ID

tables below

Project , Staff, Asset, allowances, travel, mark up

What I can do is create a new project, then add records to each of the other tables on what different items I require,

i.e. I create a new project - called project one, in the project table I create a record stating, name, time scale, client and location, then I add different records to each of the other tables on what I require all linked to the same project ID. (probably not explained that too well)

Now I want to create a query that lists all the requirements one after the other this will make it easier to create reports and to calculate costing's.

At the moment I have made 5 different queries listing all the data, then have one report containing 5 sub reports to display the data, no this does work.

View 7 Replies View Related

Field List In List Box

Sep 24, 2006

I have a list box which contains a Field list of all the fields in a query in my database. Is there any way in which I can exclude a column from this list? Each record has an AutoID which I don't want the user to see, but this appears as a field.

Thanks in advance,

Gary

View 1 Replies View Related

General :: Dropdown List Dependent On Another Dropdown List

Jun 11, 2012

I must create a database for the company that I work for that covers the maintenance history of our stone crusher plant. In this database I have two dropdown lists. The first one is for the equipment and the second one is for the different types of parts that has to be replaced or fixed.

Not all of the equipment uses all of the listed parts, but some parts are used on more than one type of equipment.

I have already created a database that lists all the equipment and another one that lists all the parts.

What I want to do now is create a Yes/No box for each type of equipment so I can mark which parts is used by which equipment.

Then you must be able to select the type of equipment from a dropdown list and then select from a dropdown list that only has the parts that is used by the piece of equipment.

I am using Access 2007

View 4 Replies View Related

List Box Help

May 6, 2005

I have a list box with names of individuals. What I would like to do is when one of the names is selected it will take it off the list and do this for all the names in the list until all are removed then will reset and have the names avaialble once again. Is this possible and if so how can it be done? Thanks.

View 2 Replies View Related







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