How To Display Current .mdb Filename?

Sep 8, 2004

I have a replicated database. I'd like to display the name of the version of the database that is being used on the data entry form so it's clear which version is being used.

What's the code for the current filename? (I'm talking about the entire "filename.mdb" file).

View Replies


ADVERTISEMENT

Need To Display Value From Another Table If Current Value Is Null

Jul 13, 2006

There are 3 main tables

tblDrawingRegister - stores information about construction drawings
tblDrawing Revisions - each drawing in tblDrawingRegister has one or more revision or version
tblVendorDrawingList - this table has a list of drawings numbers that correspond to the drawings in tblDrawingRegister.

The drawing numbers from the vendor table as provided as an 'extra' as some people are more familiar with this numbering system.

Now the issue is that there is a one-to-many relationship between tblDrawingRegister and tblVendorDrawingList. In the screenshot I've attached there are 14 drawing numbers that correspond to one drawing number in tblDrawingRegister. (This is because the main supplier has packaged 14 drawings as one with just one drawing number). When this is the case I want to display the drawing title from the Vendor table. Otherwise if should just show the title from tblDrawingRegister.

I have tried using Dlookup to show the title from the vendor table when there are dublicates in the vendor table. It didn't work and I think this would be really slow. I've tried a few other things too but to no avail.

I really hope that this is clear. I've attached screenshots of the query too.

View 5 Replies View Related

Query Criteria To Display Current Week Only?

Jan 23, 2012

I have a database that lists jobs that need doing, in the jobs table there is a Deadline field, this is a Date Time field that specifies when a job must be finished by.

So I'm trying to make a query, using my limited knowledge, that displays all jobs that need finishing between todays date and the rest of the week.

So I tried this and got nowhere:

Between #(Date())# AND #(Date()+7)#

View 4 Replies View Related

Queries :: Button To Display Current Time (Sign In And Out)

Jan 27, 2015

I have created a button to display the current time ( sign in and out).

It works fine with this code Me.field = time$

However i need a code beneath it to run the actual query that will display this time onto the table...

I have attached an image of one of the query, I need it to run.

View 5 Replies View Related

Tables :: How To Display Default Value Of Date / Time Field For Current Year

Aug 20, 2013

All, using access 2010. How do I display the default value of a date/time field to just the current year instead of using =date() to get the full date.

View 5 Replies View Related

InsertFile Filename

May 13, 2005

dears members,

I m trying to add document2.doc to document1.doc by clicking a button on a form.

I use the next VBA code.

Selection.InsertFile filename:="document2.doc", Range:="", ConfirmConversions :=False, Link:=False, Attachment:=False

I get the following message error:

Err.number = 5174
Err.Description = "The file cannot be found"
Try one of the following things:
* Check if you write the name good
* try an other file name (document2.doc)

The file document2.doc does really exist and is saved in the same directory as document1.doc

the problem is sometime I get the error message some times not in this last case it works very good.

can any body help me ?

Thanks in advance.

View 1 Replies View Related

Forms :: Create List Box To Only Display Information From Another Form Related To Current Form

Mar 20, 2014

What I would like to do is create a list box that will only display the information from another form that is related to the current form.So I have a form call Equipment Catalog and that form is related to Equipment features 1 to M relationship and the Equipment Features is related to a Features form M to 1.

So what I want to do is display all the related equipment features in a listbox that is related to the current PK of that form.So if there is only one feature on one form the list box will only display that one item however is there is 6 features on another it will display all 6.I have been trying SQL and Queries but I still can't get it to work.

View 1 Replies View Related

How To Append Date To Filename??

Jun 28, 2005

I'm making a macro to output a report to an Excel spreadsheet using OutputTo and would like to add the date to the filename since this is done each day and the files need to be different. So I'd have something like "Output" as the base filename and "Output20050628" as the final filename. Would someone please help me out on this? Thanks in advance.

View 3 Replies View Related

Extract Date From Filename

Apr 12, 2008

I think I am on the right track, but I am stuck with importing the date from my excel filename. Currently the following code imports all Excel files from the directory into a table in my database. The excel files are saved like "ABC_BNG_GTR_04012008.XLS" The numbers represent the date. I need for the date to be extracted and place in table into the "callDate" field. When I run my code, I continue to get a runtime error 13 - type mismatch. The code stops at the Mid() statement. What am I doing incorrectly? Thanks in advance.

Option Compare Database

Private Sub btnImport_Click()
Dim strFile As String 'Filename
Dim strFileList() As String 'File Array
Dim intFile As Integer 'File Number
Dim filename As String
Dim path As String
Dim TheDate As Date


DoCmd.SetWarnings False
path = "C:UsersChinaboyDesktopData"

'Loop through the folder & build file list
strFile = Dir(path & "*.xls")

While strFile <> ""
'add files to the list
intFile = intFile + 1
ReDim Preserve strFileList(1 To intFile)
strFileList(intFile) = strFile
strFile = Dir()
Wend

'see if any files were found
If intFile = 0 Then
MsgBox "No files found"
Exit Sub
End If

'cycle through the list of files
For intFile = 1 To UBound(strFileList)
filename = path & strFileList(intFile)
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "sheet2", filename, False

'Inserts date in date column based on file name

TheDate = Mid(strFile, 12, 8)

CurrentDb.Execute "UPDATE sheet2 SET callDate =" & "'" & TheDate & "' where callDate is null"


Next intFile

DoCmd.SetWarnings True

End Sub

View 14 Replies View Related

Headache With Changing The Filename... ...

Oct 19, 2006

Hi all,

I got a headache to changing my form's filename... i am totally a newbie in Access while in the few months ago... so i just create all those form or table name's for the way i like. But now i had already know how important of management of the filename because when u r using the module to write the code u will be headache to look for the filename that u want in the code. So that is important to add 'tbl', 'frm', 'Qry' infront of the filename.

So do anyone have a good way to edit all the file name with all match to the other in the module with a quick way rather then one by one editing (really tired for one by one) Thanks!!!

View 4 Replies View Related

Adding The Value Of A Listbox To A Filename

Aug 10, 2006

Good morning,
I have a listbox that contains dates (0105, 0205, 0305, etc.) and depending upon which date is selected in the list box, I want to import the corresponding month's text file. Here's the code:

Private Sub List64_DblClick(Cancel As Integer)
Dim frm As Form, CTL As Control
Dim VARITM As Variant
Dim X As Integer
Dim period, PERIOD1 As String
period = Me!List64.Column(4)
PERIOD1 = Me.List64.Column(0)

DoCmd.TransferText acImportFixed, "df import specification", "LOCAL DF-SL", "S:FinanceAccounting OperationsNational AccountsAccount Recs116406-Account ReconDF_" & PERIOD1

DoCmd.TransferText acImportFixed, "Rf import specification", "LOCAL RF-SL", "S:FinanceAccounting OperationsNational AccountsAccount Recs116406-Account ReconRF_" & PERIOD1

DoCmd.TransferText acImportFixed, "MDdf_import_spec", "LOCAL DF-GL", "S:FinanceAccounting OperationsNational AccountsAccount Recs116406-Account ReconMDDF_" & PERIOD1

DoCmd.TransferText acImportFixed, "MDRf_import_spec", "LOCAL RF-GL", "S:FinanceAccounting OperationsNational AccountsAccount Recs116406-Account ReconMDRF_" & PERIOD1

So I have the files saved on the above mentioned S: drive, i.e., MDRF_0105 and when the user selects 0105 in the listbox, I want the appropriate file to be imported.

This code is set on the DblClick event.

Please help!

Thank you!

View 3 Replies View Related

How To Get Filename To Show Up Next To Attachment Box

Mar 13, 2012

Is there a code to get a filename to show up next to an attachment box?

View 2 Replies View Related

Modules & VBA :: Display Last Record Next To Empty Space On Current Record

May 6, 2015

I'm trying to make a form that shows what the last record was next to the empty space where you enter a new record.

This is so the user knows that what they are entering is roughly in line with what has come before.

So for example if I was recording temperature every May, I would like a form that has a field called temperature and next to that field I would like to see last year's temperature.

Records:

Date | Temp
2014 | 20.5
2013 | 18.5
2012 | 19.0
2011 | 22.7
2010 | 15.2

So when I enter the record for 2015 I have a box that says: Temp and next to that box is "Last year was 20.5" or something like that.

View 2 Replies View Related

Change Filename Of Exported Textfile

Jun 6, 2006

Hi All,

I have this line of code:

DoCmd.TransferText acExportDelim, "Dhcp Specification", "tblDHCP", "U:" & [Forms]![frmExportDHCP]![cmbServer] & ".txt", False, "", 850

Where the section highlighted is a combo box on a form. I was trying to use the value in this combo box to describe the filename of the text file I was exporting to. However I get the error:

The Microsoft Jet Databse Engine could not fond the object 'X#txt'. Make sure the object exists and the you spell it name and path name coreectly.

Where X is the string stored in the combo box.

Any ideas where I have gone wrong/what could be improved?

Cheers,

Matt

View 1 Replies View Related

Saving An Email With A Unique Filename

Nov 3, 2004

I am trying to create a unique filename when sending a report via email in snapshot format.

As already stated in another thread, the filename comes from the report's "caption" property.

Can a unique filename be given in a case like this? I need the filename to be a series of concatenations of
field names.

This report will be sent one page at a time. And sent by seperate people as many as 100 times in a single month. And as much as 1000 times in a single year. Each page (report) will be stored on a sever. So saying that, the need for a unique filename for each time the report is emailed is very important.

Thanks for any assistance on this.

Tasha

View 14 Replies View Related

Modules & VBA :: GET Filename Directly From Path

Sep 18, 2014

For instance, I got some dynamic length path with filename as follows:

F:OUTDOOR9-8W1250832 ABCworking 1.3-0.6 BOARD 720.tif

Is there any easy way to get only the "working 1.3-0.6 BOARD 720.tif", which is the desired filename.

View 2 Replies View Related

General :: CSV Files - Importing Filename That Changes

Jul 2, 2015

I need to import a number of .csv files every day and overwrite the old tables with the data from the new .csv files. However, each day, the filenames will change.

For example,

Day 1: Import fileA 1.csv, fileB 1.csv, fileC 1.csv
Day 2: Import fileA 2.csv, fileB 2.csv, fileC 2.csv
Day 3: Import fileA 5.csv, fileB 5.csv, fileB 6.csv

The files will be named fileA [#].csv, fileB [#].csv, fileC [#].csv, and so on, with a different number each day (with no pattern to the numbers).

Is there a way to write an import specification or VBA script that will import these? Perhaps something that allows a regular expression in the file path so I can import "C:fileA*", "C:fileB*", etc.?

View 5 Replies View Related

Strip A Filename String Of Any Disallowed Characters

May 8, 2006

I am writing some search results to an excelsheet for reports using the time and date functions to build a filename. I downloaded a StripSpecialCharacters() module, but it doesn't take them all out (only takes ascii above 127).

Does anybody know of another function to do it. searched the archive to no avail.

Thanks in advance

View 5 Replies View Related

Queries :: Formula To Capture Filename In Query?

Jan 25, 2014

Need a formula which can capture filename for me. For example, I have a db saved at "C:DlocationofficeChina.accdb". Is there a way to capture "China" in a query?

View 2 Replies View Related

Modules & VBA :: Set Filename / Location In Save As Dialog

May 7, 2015

The code below sets my printer to "Cute PDF writer" and then opens a report in print view, which creates a PDF version of my report. So far so good. But just before the last step, it brings up the Save As dialog box, asking for a filename and location.

Three points are important:I always want to call the PDF document "Specialty Report".I always want to save it to C:Documents and Settings80435 Desktop. I always want to overwrite the previous version.

Is there some code I can insert that would achieve this automatically with no further user interaction i.e. user clicks a button and the PDF file is created/overwritten?

Code:

'Produce the report
Dim defPrinter As String, NewPrinter As Printer
defPrinter = Application.Printer.DeviceName 'Get the default printer name
Set NewPrinter = Application.Printers("CutePDF Writer") 'Create a new printer object
Set Application.Printer = NewPrinter 'Set the default printer to the new printer
DoCmd.OpenReport "Specialty Report", acViewPrint 'Open the report in print view (which will PDF it)
Set NewPrinter = Application.Printers(defPrinter) 'Reset the printer back to the default printer

View 3 Replies View Related

Modules & VBA :: Inserting Filename And Path Into Table

Jan 8, 2014

I have a table named tbl_imagepaths with fields:

ImageID
File
Folder

The command button has the code below, it works great and pops up with a window with the file name and path. I now just need the code to insert the file name and path into the table....

Code:
Private Sub Toggle7_Click()
Dim f As Object
Dim strFile As String
Dim strFolder As String
Dim varItem As Variant
Set f = Application.FileDialog(3)

[Code] .....

View 7 Replies View Related

General :: Opening DB With A Space In Filename Via Command Line

Jan 21, 2013

I am working on supporting spaces in the DB filename. I got the rest of my program working... other than being able to invoke Access with the specified filename for it to open.

Code:
C:Documents and Settingsc_mlueckMy DocumentsFandango>"C:Program FilesMicrosoft OfficeOffice12MSACCESS.EXE" "Schema Ideas.accdb"

C:Documents and Settingsc_mlueckMy DocumentsFandango>dir "Schema Ideas.accdb"
Volume in drive C has no label.
Volume Serial Number is C8E4-5856

Directory of C:Documents and Settingsc_mlueckMy DocumentsFandango

01/18/2013 04:45 PM 3,203,072 Schema Ideas.accdb
1 File(s) 3,203,072 bytes
0 Dir(s) 125,846,482,944 bytes free

The envoking of MSACCESS.EXE results in:

Does Access 2007 MSACCESS.EXE not support DB's with a space in the file name being spefied to auto-open via command line switches?

View 3 Replies View Related

Modules & VBA :: Import More Than 300 TXT Files And Add Filename Into Empty Field

Aug 14, 2015

I need to import 300+ individual .txt files into a MS Access DB table (named "tbl_input"). Each of the the .txt files have a naming convention similar to this:

Pink_Floyd_YYYYMMDD.txt

Because this initial import is so large and I would like to avoid doing it manually, I need to be able to:

import each of these files into a single table
delimit the text in each based on the "|" symbol
add the filename into an empty field

View 1 Replies View Related

Modules & VBA :: Button That Automatically Save A Report As PDF And Generate Filename

Oct 8, 2013

Is it possible to create a button that automatically saves a report as .pdf? And automatically generates the filename.

Like 0810-544 (0810 is the date and 544 is the ID from the form.)

View 14 Replies View Related

Modules & VBA :: Export To Excel With Variable Filename Based On Query Result

Jan 30, 2015

My access is 2013.

Suppose there's a simple query which has two fields, "year" and "graduates", where "year" can be grouped by "2012", "2013", etc and "graduates" are individual names.

How can I export the list of graduates to multiple excel files, with the filename based on "year"?

I have tried to set the output file in macro as "c:desktop" & query.year & ".xls"

But it's not working and the output filename is exactly "&query.year&.xls "and the file contains all year and all names.

View 14 Replies View Related

Forms :: Goto Form With Current User And Current Date

Aug 27, 2013

What I really need is for when the form opens, it looks at todays date, then matches current user and then goes to that record for today, if no current user there, then will goto new record..

i know, sounds complicated, and probably is really easy, but my heads not with it today, as about to get drunk as its my 40th, and got people ringing and texting and still trying to get this done....

I've included a copy of this database, named Timecards..

View 1 Replies View Related







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