Exporting Query Design.

Apr 24, 2008

Hi All,
I am currently in the process of writing a manual for one of our access database systems (it's written in a modified version of access). Unfortunately this database was not written by me and has many different queries which in the end returns a number of export files... Obviously I could look through each query one by one and copy the details down into a table in word or whatever.

I am just wandering is there any way to export the design of the query itself or even print it out, as obviously I could then complete a Visio like diagram and include that in the appendix of the manual.

Searched google and the access help and what not but I can't seem to come up with anything :(

View Replies


ADVERTISEMENT

General :: Exporting Data From A Table Keeping Current Design

Sep 16, 2013

I want to export details from a table in access to a word document or any other document that will keep the current design and let me make changes afterwards.

View 4 Replies View Related

Query Design.DB Design Question

Sep 10, 2007

Hey,

I've got this problem and im 95% sure its going to need a query in order to achieve this answer im looking for.

I'm creating a Software Licensing Management db and its all working lovely. However my only problem remains is the graphical representation (text box within one of the forms) of howmany licenses are/aren't(doesnt matter if this number is a +/- number) available.

In order to achieve this answer I dont think you'l need the table structure of any of my tables other than these two:

tblLicenseInformation
License_ID
LicenseDescription
NumOfLicensesPurch
SoftwareOverview_ID

tblHardwareSoftwareLicense
HSL_ID
Hardware_ID
Vender_ID
Software_ID
AppEdition_ID
AppVersion_ID
SoftwareOverview_ID
License_ID

However I would like to add a column to either of these tables named 'Availability' or something similar which will show the licenses available.

I've tried a number of Update/Append queries but all have failed. I want this Available running variable held within the table due to it not changing to much of the current db design as i baisically finished the project and they asked for it! any ideas of how to efficiently achieve this will be much appreciated!

cheers

View 3 Replies View Related

Design View Keyboard Shortcut - Expand Columns In Design View Of A Query

Jun 5, 2014

I'm looking for a keyboard shortcut to expand the columns in "design view" of a query.

What I mean by this is rather than selecting all of the columns and double clicking to see the entire text, I'd like to be able to a shortcut.

The entire process as I see it involves 3 steps so I will need thesolution to the 3rd step.

(1) [ctrl+spacebar] to select initial column
(2) [shift+arrows] to select all of the columns I need
(3) [keyboard shortcut] will expand all of the columns "field" names to the size of the column heading

Alternatively, if you know of a shortcut that will expand the columns without having to select them first I'll take it!!

View 4 Replies View Related

Exporting Query

Nov 16, 2006

Hi.

How would you go about exporting a query to a textfile, and the text file been sorted alphabetically?

View 4 Replies View Related

Exporting A Query To DBF

Dec 13, 2007

I'm hoping this isn't a silly question, but I'm going to ask it anyways.....

I have created a fairly sizeable query combining two existing tables. I am hoping to get this query to a dbf format, so that I can link it to an existing GIS theme. When I attempt the export, I get an error stating I cannot define a field more than once.

I've found a way around this, namely by exporting to an xls file and then saving as a dbf, which works but is a hassle. Am I doing something wrong??

Thanks,

Azimuth

View 1 Replies View Related

Exporting A Query Problem

Jun 5, 2005

I have a table that has mainly text fields and a few number fields. These number fields are simply a code to joined tables that contain repetitive text. I want to export the data with the text instead of the number code. The query runs fine and has the text where it should be but the export just has the number. It's been a while since I've used Access. I'm probably just forgetting something basic. Any hints?

View 2 Replies View Related

Query For Exporting To Excel

Oct 20, 2006

I've been searching for a good solution for this and can't find it. Hopefully something like this is possible.

I need to produce a report in excel from my database that needs to include information from 5 different tables. The relationship between two of these tables is a many-to-many relationship connected by a junction table. (I hope that is the right terminology)

My report needs to be in a certain format and needs to include all fields in the same order for every record.

The problem arises because of the many-to-many relationship. I have a tblOrder and a tblAgent linked by the junction table tblAgentOrder. For every order there can between 1 and four different agents associated with the order which are stored in the junction table. In addition these agents will be of different types 1-4.

Ex: One order could have an agent of type 1 and an agent of type 4. While another order may only have one agent of type 2.

I need the query to give me the result of OrderID, DateOpened, AgentType1, AgentType2, AgentType3, AgentType4. Regardless of if the order actually had an AgentType3 or 4 associated with it. In this case the fields would be blank.

Right now I'm getting:
OrderID, DateOpened, AgentType1
OrderID, DateOpened, AgentType2

I hope this makes sense, but let me know if I need to clarify anything.

Thanks in advance.

View 2 Replies View Related

Exporting A Query To Excel

Nov 7, 2006

I have a form that allows users to specify the information they want to be displayed on a subform. I have used the below code (simpilified for example purposes) to create the SQL string and sent it to the subform for display. I would like to have an export to excel button to export the recordSource to a spredsheet. is this possible?


Me.frmsubClients.Form.RecordSource = "SELECT DISTINCT New_Client_Table.Account_Number" & BuildFilter

Thank you in advance.

View 1 Replies View Related

Exporting A Query To Excel

Dec 4, 2006

Hi all, when exporting a query to Excel is it possible to perform page set up controls to the Excel sheet? Or will I need to create VBA page set up controls with in a Set objXL = New Excel.Application??:confused: :confused: :confused:

View 1 Replies View Related

Exporting A Query(report) To Excel

Mar 11, 2008

I am exporting queries to Excel using a Form with command buttons. The code for this effort follows:

Private Sub Command8_Click()

Dim reportName As String
Dim theFilePath As String


Select Case Me.Frame1.Value

Case 1
reportName = "qryPriorMnth"
Case 2
reportName = "qryNewRequests"
Case 3
reportName = "qryNoApprovals"

End Select

theFilePath = Me.txtFilePath.Value
theFilePath = theFilePath & reportName & "_" & Format(Date, "yyyy-mm-dd") & ".xls"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, reportName, theFilePath, True

MsgBox "Done."

End Sub

The code works great, however, I will be making this available to several users who will use access from differenct PCs. In order for them to get the data passed to their respective desktops, they would have to change the Me.txtfilePath.Value in the properties manaually. This is currently in the Row.Source for an unbound text box. I would prefer them not messing with that. The current value is
="C:Documents and Settings’User_ID’Desktop"
where the User_ID (varies from user to user) would need to be changed. Can this be done with a variable setting that would prompt the user for their User_ID and then execute to the appropriate desk top. I am a VBA novice and would appreciate any help at all.

Thanks
Alan

View 2 Replies View Related

Exporting Access Query To Excel

Oct 23, 2007

I am using the DoCmd.TransferSpreadsheet statement that successfully exports a query result set into excel. I was wondering is there a way to get this result to populate certain fields of an existing excel spreadsheet that I have created and need the information for. Right now the query just creates a new worksheet in the specified workbook.

View 2 Replies View Related

Queries :: Exporting A Query To TXT File

Aug 13, 2014

I am having trouble exporting a query from ACCESS 2010 to a .txt file. I have a field in the middle of the query, and I cannot get the data of this field unless I put it in the end of the query (as the last field). I think I must be doing something wrong, but I don't known what may that be.

View 7 Replies View Related

Queries :: Crosstab Design Is Slow When Opening And Saving In Design Mode?

Oct 6, 2014

I have had to use my first crosstab queries.

I now understand that when opening and saving crosstab queries Access (2010) runs that query to ascertain the column names. Unless you hard-code them. Running the query takes at least 20 minutes.
I have hard-coded where I can, but one report takes arbitrary dates so I can't hard-code them.

I believe that turning off AutoCorrect might make a difference to whether the query runs - but I don't want to turn it off.

View 6 Replies View Related

Automation (query For Exporting To Excel) Error

Jan 5, 2006

Hi folks, I need your help.

Did any one get a error message like the one below:

Run-time error ‘3061’:
Too few parameters. Expected 1.

Basically I have a form with a command button and a combo box. The combo box's row source property is set to the following sql:

SELECT DISTINCTROW tblProjts1.intProjectID, tblProjts1.chrProjectName FROM tblProjts1 ORDER BY tblProjts1.chrProjectName;

I have a command button which runs the following procedure (Thanks, credit goes to madrav72):
Private Sub cmdSendToExcel_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb

'Set rs = db.OpenRecordset("qryOne", dbOpenSnapshot)
Set rs = db.OpenRecordset("qryTwo", dbOpenSnapshot)

'Start a new workbook in Excel
Dim oApp As New Excel.Application
Dim oBook As Excel.Workbook
Dim oSheet As Excel.Worksheet

Set oBook = oApp.Workbooks.Add
Set oSheet = oBook.Worksheets(1)

'Add the field names in row 1
Dim i As Integer
Dim iNumCols As Integer
iNumCols = rs.Fields.Count
For i = 1 To iNumCols
oSheet.Cells(1, i).Value = rs.Fields(i - 1).Name
Next

'Add the data starting at cell A2
oSheet.Range("A2").CopyFromRecordset rs

'Format the header row as bold and autofit the columns
With oSheet.Range("a1").Resize(1, iNumCols)
.Font.Bold = True
.EntireColumn.AutoFit
End With

oApp.Visible = True
oApp.UserControl = True

'Close the Database and Recordset
rs.Close
db.Close

End Sub
qryOne:
SELECT tblProjts1.intProjectId, tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, tblMaxLoad.*
FROM tblProjts1 INNER JOIN tblMaxLoad ON tblProjts1.intProjectId = tblMaxLoad.intProjectId;

qryTwo:
SELECT tblProjts1.intProjectId, tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, tblMaxLoad.*
FROM tblProjts1 INNER JOIN tblMaxLoad ON tblProjts1.intProjectId=tblMaxLoad.intProjectId
WHERE (((tblMaxLoad.intProjectId)=Forms!frmReprtSelen!cb oProj));

My problem: When I run cmdSendToExcel_Click procedure with “ Set rs = db.OpenRecordset("qryOne", dbOpenSnapshot) “ it loads the excel and export the data to Excel without any problem. The Excel spreadsheet will show the rows as follows:
ProjtIdProjName Column3Column4 Column5, etc
8Bechtel xxxyyy
9WOPS aaabbb
11Spring zzzttt
12AgP mmmnnn

But when I run with Set rs = db.OpenRecordset("qryTwo", dbOpenSnapshot), I get the error
“Run-time error ‘3061’:
Too few parameters. Expected 1.”

I even tested the qryTwo using a separate command button with the following code on the click event:
stDocName = "qryTwo"
DoCmd.OpenQuery stDocName, acNormal, acEdit
and it produces the single row based on the projectId selected on combo box (as shonw below in datasheet view):
ProjtIdProjName Column3Column4 Column5, etc
8Bechtel xxxyyy

Does any one have any clue what this error 3061 is? Please help. I am struggling almost a week to figure this out, NO LUCK.

Thanks for your time and help in advance.

Shan.

View 1 Replies View Related

Exporting Dates From Query To Txt File As String

Jan 2, 2007

I have a complex query that I am exporting to a tab delimited text file.

The query has three date fields, and a time field. The query export results in both the date and time portions of the value being shown instead of one or the other.

I have tried using the format function to force the dates to only show the date portion, and the time field to only show the time portion. So far, without luck.

I would greatly appreciate help from someone who can spot what I am doing wrong. The sql for my query is below.


SELECT tblSiteVisits.RunID AS TripID, Format([tblSampleRuns]![RunDate],"mm/dd/yyyy") AS [Trip Start Date], Format([tblSampleRuns]![RunDate],"mm/dd/yyyy") AS [Trip End Date], [RunName] & " " & [tblSampleRuns]![RunDate] AS [Trip Name], "LUMMI001" AS [Project ID], tblSites.SiteNumber AS [Station ID], STORET_SiteVisitNum.VisitNum AS [Station Visit Number], [tblSiteVisits]![SiteVisitID] & "-" & [tblParameters]![Matrix] AS [Activity ID], [tblParameters]![Matrix] AS Medium, Storet_ActivityCategories.Activity_Type AS [Activity Type], Storet_ActivityCategories.[Activity Category], tblSampleData.QCIndicator AS [QC Indicator], STORET_Replicate.RepNo AS [Replicate Number], Format([tblSampleRuns]![RunDate],"mm/dd/yyyy") AS [Activity Start Date], "" & Format([VisitTime],"hh:nn:ss") & "" AS [Activity Start Time], STORET_TimeZoneOutput.TimeDatum AS [Activity Start Time Zone], "" AS [Depth to Activity], "" AS [Depth to Activity Units], tblSiteVisits.SiteComments AS [Activity Comments], Storet_MethodsProcedures.ProcedureID, IIf([LabParam]=-1,"WSWB","") AS [Gear ID], Storet_Characteristics.CharacteristicName, IIf(IsNull([PracticalDetectionLimit]),Str([Value]),IIf([Value]<[PracticalDetectionLimit],"Present < QL",Str([Value]))) AS [Result Value], tblUnits.UnitName AS [Result Value Units], Storet_Fractions.Fraction, "" AS [Result Comment], "" AS Personnel, IIf([tblParameters]![LabParam]=-1,[LabID],"") AS [Laboratory ID], Storet_MethodsProcedures.ProcedureID AS [Field/Lab Procedure], Storet_MethodsProcedures.SourceAcronym AS [Field/Lab Procedure Source], "" AS [Analysis Date], "" AS [Analysis Time], "" AS [Analysis Time Zone], "" AS [Lab Sample Prep Procedure], "" AS [Lab Sample Prep Procedure Source], tblSampleData.PracticalDetectionLimit AS [Detection Limit], tblSampleData.UnitID AS [Detection Limit Unit], "F" AS [Result Status], tblStatisticTypes.StatisticType AS [Statistic Type], IIf(IsNull([tblSampleData]![StatisticTypeID]),"Actual",[ValueType]) AS [Value Type]
FROM ((Storet_StaticFields RIGHT JOIN tblSites ON Storet_StaticFields.StaticFieldID = tblSites.StaticFieldID) RIGHT JOIN ((tblRuns RIGHT JOIN (tblSampleRuns LEFT JOIN STORET_TimeZoneOutput ON (tblSampleRuns.RunDate = STORET_TimeZoneOutput.RunDate) AND (tblSampleRuns.RunID = STORET_TimeZoneOutput.RunID)) ON tblRuns.RunTypeID = tblSampleRuns.RunTypeID) RIGHT JOIN (tblSiteVisits LEFT JOIN STORET_SiteVisitNum ON tblSiteVisits.SiteVisitID = STORET_SiteVisitNum.SiteVisitID) ON tblSampleRuns.RunID = tblSiteVisits.RunID) ON tblSites.SiteID = tblSiteVisits.SiteID) RIGHT JOIN ((Storet_Fractions RIGHT JOIN (Storet_Characteristics RIGHT JOIN tblParameters ON Storet_Characteristics.CharacteristicID = tblParameters.CharacteristicID) ON Storet_Fractions.FractionID = tblParameters.FractionID) RIGHT JOIN (Storet_MethodsProcedures RIGHT JOIN (Storet_ActivityCategories RIGHT JOIN (STORET_Replicate RIGHT JOIN (((tblSampleData LEFT JOIN tblStatisticTypes ON tblSampleData.StatisticTypeID = tblStatisticTypes.StatisticTypeID) INNER JOIN STORET_ActivityType ON tblSampleData.ResultID = STORET_ActivityType.ResultID) LEFT JOIN tblUnits ON tblSampleData.UnitID = tblUnits.UnitID) ON STORET_Replicate.ResultID = tblSampleData.ResultID) ON Storet_ActivityCategories.ID = tblSampleData.Activity_Category) ON Storet_MethodsProcedures.MethodID = tblSampleData.MethodID) ON tblParameters.ParameterID = tblSampleData.ParameterID) ON tblSiteVisits.SiteVisitID = tblSampleData.SiteVisitID
WHERE (((Storet_Characteristics.CharacteristicName) Is Not Null) AND ((IIf(IsNull([PracticalDetectionLimit]),Str([Value]),IIf([Value]<[PracticalDetectionLimit],"Present < QL",Str([Value])))) Is Not Null) AND ((tblSampleRuns.RunDate) Between [forms]![fmExportStoret]![StartExport] And [Forms]![fmExportStoret]![EndExport]) AND ((tblSampleData.SampleStrata)=1 Or (tblSampleData.SampleStrata)=2 Or (tblSampleData.SampleStrata)=3) AND ((tblSampleData.Exported_To_Storet)=[Forms]![fmExportStoret]![ExportType] Or (tblSampleData.Exported_To_Storet)=0));


and the code for the export is

Dim MYPATH As String

MYPATH = CurrentProject.Path & "EXPORTRESULTS" & Format(Date, "mmddyyyy") & ".txt"

DoCmd.TransferText acExportDelim, "STORETEXPORT", "STORET_MSRRESULTS_TABLE2", MYPATH, True



Thanks for taking the time to help :)

View 9 Replies View Related

Looking For Example Of Exporting Query Results To Excel Template

Jan 27, 2008

Hi all,

I'm not very experienced with Access. I'm looking for a very simple sample of how to export Query results to an Excel Template document. Especially to specific cell references. Would anyone have one to share. I'm trying to get my head around the concept first.

I may have to use Access 2000 and later versions to run the database, so do I have to cater for both DAO and ADO?

Thanks in advance for any help
rgs
Ginny

View 2 Replies View Related

Exporting Query Result In Excel, From A FORM

Dec 7, 2004

Hi,
I have some queries in MS-Access, that I run twice every day.
I store the query result in excel, with specific name and slot-code like HSC_25-Dec-04_S2.xls
( Exmple : High_Score_Customer_25-Dec-04_Slot-2) .

First few letters of the file name is static, but I want to select the Date, Slot_Code from the controls.

I have designed the form, 'CmdExport' is the command-button name, on clicking the button I need to export query result in MS-Excel.

I need help to proceed.

Can anyone guide me....................please help me...


Regards,

View 1 Replies View Related

Modules & VBA :: Exporting Query To Excel Spreadsheet

Sep 18, 2014

I am trying to export a query to an pre-existing spreadsheet. I am new to VBA and when I implement the following code nothing happened.

Option Compare Database

Public Function Sheet(strTQName As String, strSheetName As String)

Dim rst As DAO.Recordset
Dim ApXL As Object
Dim xlWBk As Object

[Code].....

View 5 Replies View Related

General :: Exporting Excel File From Query

Dec 17, 2013

Am trying to export an excel (97-03) file from a query I have. Some of the columns have exported as number values (as its linked via unique id's). I want it to export certain columns as the text columns. I have tried the lookup route but it doesn't seem to make a difference.

View 4 Replies View Related

Queries :: Exporting Query To Excel Causes SQL To Be Deleted

Jul 10, 2013

I wrote a SQL query that works fine. But when I call a custom function to export it to Excel, my query SQL will get deleted (not consistent). All that is left of the script is SELECT;

MS Access 2007, Windows 7.

Here's how I call the function:

Code:
Private Sub exportQryCustStatusAnalysisLite_Click()
Call ExcelSmsOutput("Query", "qry_custStatusAnalysisExport", "qry_custStatusAnalysisExport", Forms![frm_main].[filePath])
End Sub

Here's the custom function:

Code:
Public Function ExcelSmsOutput(objectType As Variant, prefixFileName As Variant, objectName As Variant, filePath As Variant)
Dim outputFileName As String
outputFileName = prefixFileName & " " & Format(Now(), "yyyy-mm-dd hhh mmm sss")

[Code] .....

View 2 Replies View Related

Queries :: Exporting Query With Parameters To CSV Template

Feb 9, 2015

I have a template csv file which has comes with headers. I now need to export multiple datas from my different tables into the csv file. I thought I would open an instance of excel, open the query as recordset (in VBA) and go through each record and finally use appExcel.saveAs as a CSV file. The approach doesnt look like it will look. I have looked into the DoCmd.Transfer text method but I cant seem to create a export specification because my query requires two parameters (startDate and endDate).

Secondly it is a huge template, over 700 fields and I will only be exporting around 40 fields so there will be huge number of empty fields. If this was a excel file, I would write few queries and write result from one query into the file then skip required columns and then write results from another query but I don't know if its possible with Docmd.write txt.

I am using access 2013 (Office 365 Pro) to perform all of this.

View 10 Replies View Related

Queries :: Exporting Query To A Text File?

Jun 15, 2013

I'm trying to export query results to a text file and it keeps giving me a "too few" parameters error.

View 7 Replies View Related

Exporting Query To Specific Excel Sheet

Jan 24, 2012

What I am trying to do is EXPORT a query to an Excel Workbook which is read only and I need the data to land in a specific sheet in the excel workbook.

I have tried transferspreadsheet vbcode etc. but nothing works quite right and the fact the spreadsheet is Read Only does not work.

The Name of the Query is "Accrual"

The Name and location of the Excel Spreadsheet is "c:register.xls"

The Sheet inside the workbook is called "data".

I need the data to land in the "data" sheet over the top of the previous data and not create a new sheet or mess with the formulas that are linked to the "data" sheet.

View 2 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.

All is well and fine until source data changes and the pass-through query runs too long and times out.

If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table

Is there a way to open an Append or Make-table query in Design view without invoking the source query?

View 1 Replies View Related

Exporting Query Data To Excel And Hyphen Character

Jul 12, 2005

Hello all,

I have always been wondering why this happens, and now I have a problem with it.

When I export a Table/Query from Access to Excel (be it with Right CLick -> Export...or TransferSpreadsheet) there is an apostrophe character (') appended to the front of some/each cell in Excel. You cannot see it immediately, but when you click on the cell, there is this character. WHY? Does anyone else have experience in this? :confused:

Thanks in advance.

View 3 Replies View Related







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