Modules & VBA :: Extract Medium Time

Aug 24, 2013

text59 is formated as general date. when the user dbl clicks the field i would like the value to go to "time_in" and formated as medium time.

Code:
Me.Time_in = Me.Text59 Format (Me.Text59 = "medium time")

The code brings the date and time to the time_in field...even with the time_in field formated as medium time

View Replies


ADVERTISEMENT

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still shorttime but when you read the time within the code it comes out in AM/PM format. Also, when the defaul tiem should be #20:00:00# but this changes to #8:00:00 PM#

Weirdly though, when you just open the table, the times are in the correct shorttime format.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

This screen shot may help:

View 2 Replies View Related

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still short time but the format is in AM/PM or medium time.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

View 1 Replies View Related

Time In Access: Keeping "medium Time" Format

Mar 25, 2008

I've run into a bug, I think. I have a time field with it set to show "Medium Time" which is "hh:mm(AM/PM)", however, when I combine the information with another field in a query (=[OfficeDay]&" - "&[POfficeTime]), the time comes out as "Long Time" or "hh:mm:ss(AM/PM)". End result is Wednesday - 10:30:00AM when it should be Wednesday - 10:30AMDoes anyone know a way around this?

View 1 Replies View Related

Queries :: Extract Max Date And Time - How To Get Corresponding ID

Jan 2, 2014

I have a (simplified) table with

ID | Date | Time | machine | value
304 1-1-2014 06:00 115 0.54%
305 1-1-2014 06:00 111 0.56%
306 1-1-2014 07:00 111 0.52%
307 1-1-2014 07:00 115 0.53%
308 2-1-2014 07:00 111 0.56%
309 2-1-2014 07:00 115 0.58%
310 2-1-2014 06:00 111 0.54%
311 2-1-2014 08:00 115 0.53%

I try to find the ID corresponding to the maximum date+time grouped by Machine.
In this case I would like to find 311 (maximum date/time for machine 115) and 308 (maximum date/time for machine 111)

The way to extract the maximum date + time is not difficult

SELECT Max([Date]+[time]) AS datevalue, tbl_TexControl.Machine
FROM tbl_TexControl
GROUP BY tbl_TexControl.Machine;

But how do I get the corresponding ID? Not with Max([ID]) because then ID 310 is selected which is not the maximum of the time.

View 5 Replies View Related

Modules & VBA :: Extract PDF Data To Table

Nov 21, 2013

Through searching, I have seen a lot of post regarding 3rd party downloads to extract pdf data to a table, any coding or a sample database that doesnt require 3rd software?

In the end, I want to import the pdf data to the table, then attach the pdf file automatically. URL....I have a pdf form that was developed in Adobe Live Cycle. For sake of example, lets say my form object names are:

TextField1
TextField2
DateField1
CheckBox1
CheckBox1[3]

View 13 Replies View Related

Modules & VBA :: Extract Transaction Data From Quickbooks

Jun 26, 2015

I'm trying to extract invoice and payment transaction data from a very old version of quickbooks. This very old version allows for the export of customer and item lists to .iif format which I can view in Excel. However, there is no method of exporting transactions. All of my searches for how to extract the data have come up empty.

I am pretty sure that I once found a post relating to looping through the file line by line and converting the data using vba. I can't find that post anywhere either.

Any method of extracting data from a quickbook .qbw file. I'm willing to do a fair amount of manual parsing if I have to, but I need to get to the data first.

View 4 Replies View Related

Modules & VBA :: Extract The Text Within The Brackets From String?

Nov 23, 2014

I have a column containing records of the timestamp of an event. I need to extract the date out of each of these records and put them in a separate table. The date and time of each record is contained within a bracket.

E.g.
ES~1~1412179200(Oct 02 00:00:00 2014)~1~ITM_W64MQMONITORLOG00~
0~0~ES~1~1412179203(Oct 02 00:00:03 2014)~1~ITM_Log_Entries~
0~0~ES~1~1412179204(Oct 02 00:00:04 2014)~1~ITM_Log_Entries~

As you can see, the number of characters of each record are different, so I am unable to do the Left$ count thingy.

Is there any other way to do it? I only need the date and time contained in the brackets.

View 2 Replies View Related

Modules & VBA :: Extract Email Address From Text

Nov 4, 2014

I have a field which contains various text including an email address which i need to extract.

My research says that I need to use a regex code but dont know how to get that into Access.

I have attached an example of the file i'm importing into Access.

View 5 Replies View Related

Modules & VBA :: Extract Data From A Word Document

Aug 21, 2014

Not sure if this is possible but I am trying to extract data from a word document to set up a database.

Basically I am trying to capture data from completed forms, similar to the sample attached, the actual blank form is 20 pages long and once completed can be as many as 30 pages, or even more, although the format doesnt change (i.e. individidual cells will expand to fit the data in the cell).

I want to be able to scan through the completed forms and extract the data i.e. Full Study Title, Short Study Title, Study Type etc. into a database.

The issues:
1. Each document will have a different name but will be stored in the same location.
2. What is on page 8, for example, in one document is not necessarity going to be the same on every document (due to expanding cells)
3. Each sector is in a separate table but tables can spread across several pages.
4. Some data is stored in a checkbox format rather than text.
5. I dont want to extract all of the data, only certain sections (at least at this stage).

View 1 Replies View Related

Modules & VBA :: Extract Specific Data From A Text File

Dec 4, 2013

I want to extract specific data from a text file and place it in my table.The following is an example of the data:

Display Author="All Saints" Title="On & On" Genre="Pop" Color="7693971" Tag="2"

I want to extract the following:

Where the word Author= appears to extract the data between the double quotes, so in the above case I want to extract "All Saints" excluding the double quotes.And then where Title= appears extract "On & On", again excluding the double quotes.So I would end up with data in my table looking something like this

strArtist [Author] strSong [Title] strGenre [Genre] strYear [Year]
All Saints On & On Pop
America Venture Highway Rock 1972
Amillionsons Misty Blue Pop 2002

my table is name tblMusicList, the fields are:

strArtist
strSong
strGenre
strYear

View 4 Replies View Related

Modules & VBA :: Extract Variable Count Of Columns And Transpose It To Another Table

Mar 14, 2014

I wanna extract a variable count of columns and transpose it to another table.

My source table is called FC containing columns like 1 FC, 2 FC .., 12 FC

My target table is called Forecast_Quantities

Tried the following:

Code:
Public Sub TRANSPOSE()
Dim rs As DAO.Recordset
Dim rsNew As DAO.Recordset
Dim varItm As Variant
Dim I As Integer
Set rs = CurrentDb.OpenRecordset("FC")

[Code] ....

Somehow it doesn't recognize the I FC column in the table FC.

View 1 Replies View Related

Modules & VBA :: Loop Through Query Results To Extract Email Addresses

Jun 27, 2013

I am trying to loop through a query results to extract email addresses from a query result.

I have the following code

NameCriteria = Forms![MainMenu]![tbl_Course_Details]![Course_Name].Value
DateCriteria = Forms![MainMenu]![tbl_Course_Details]![Course Date].Value
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sqlStr As String

[Code] .....

If i run this in access as a query then it returns results but when i run in there then it says no current Record and i cant work out why?

Someone on another post said that sql uses US date format so i tried converting to us date and still no results?

View 6 Replies View Related

Modules & VBA :: Extract Strings From A Field In Table (Separated By Colon)

Oct 21, 2013

I have a field in a table that I'd like to extra the texts from. The are stored in below format (separated by colons). They don't always the same amount of characters and not all of them have the same amount of texts.

Some may only have Text1:Text2::, while some may have Text1:::Text4.

Text1:Text2:Text3:Text4

View 8 Replies View Related

Modules & VBA :: Calculating Elapsed Time Within Time Period

Dec 1, 2013

I have a working dB which can calculate a shift duration and sum total all shifts worked within a period for the purpose of producing a labor report for payroll. I have successfully used the DateDiff function and converted the minutes to HH:MM on my form and reports. Now I want to calculate elapsed time for a specific period within a shift, I'll call it OtherHours and I am aiming to calculate a portion of time that meet the following conditions below. I am using field names of [PunchIn] and [PunchOut] and both are of type General Date.

IF [PunchOut] ISNOT Saturday,Sunday
EXIT FUNCTION
ELSE
IF [PunchOut] ISNOT Between Midnight and 0559 hours
EXIT FUNCTION
ELSE
DATEDIFF ("n", <MIDNIGHT>, [PunchOut])

My thoughts are to solve the DateDiff portion and then figure out how to apply the conditions within the IF statements.

View 4 Replies View Related

Modules & VBA :: Unable To Extract Day Number From Date Field And Write It To Day Field

Jan 10, 2014

I am trying to do some simple table operations. I have a field (Date) containing dates, and an empty field called Day.

I want to extract the day number from the Date field, and write it to the Day field.

I didn't get very far until I ran into trouble when setting my recordset. I get the error "Too few parameters, expected 1". Clicking "Debug", will highlight the code line "Set rs = db.OpenRecordset(sqlString, dbOpenDynaset)".

So far, my code looks as follows:

Code:
Private Sub Command16_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sqlString As String
Dim dataDay As Byte
'Open connection to current Access database
Set db = CurrentDb()

[Code]...

I am not very familiar with the various types of recordset settings. I just want to be able to read data from the Date field, and write data to the Day field.

View 12 Replies View Related

Modules & VBA :: How To Extract Recordset From Subform Into Recordset Object

Aug 14, 2015

Special situation: The SQL Server Linked Server across the country is linked to a Read Only Oracle DB. This data pull works perfectly and populates the Subform.

The problem is that Oracle can take 3 to 6 seconds to retrieve the single record depending on the network traffic through a small pipe.

The code below shows the RecordSource for the SubForm. clicking on a list box supplies the value. Then 3 to 6 seconds later, the subform populates.

The actual Recordset for this Recordsource is needed to conduct Validation on each field. Normally this would be on SQL Server, I might just create a Recordset Oject and run this SQL statement again in 1 milisecond. In this case, it will probably take an additional 3 to 6 seconds. Avoiding another lengthy round-trip to Oracle would be prefered.

Goal: How does one grab, clone, or other wise reference the existing recordset for the SubForm?

Note: Immediate Window - One single field can be returned quickly

There are 48 fields that need validation - is there a way to reference the entire recordset?

Immediate Window during Break Mode:
? me.fsubsrNavSHLBHL("NavSH_QQ")
NESE ' this is the correct value for the current recordsource

Set a breakpoint right after the line:
fsubsrNavSHLBHL.Form.RecordSource = "Select * from vsrNavigatorSHLBHL where Well_ID =" & txtNavWellID.Value

Immediate Window:
? me.fsubsrNavSHLBHL.Form.RecordSource
Select * from vsrNavigatorSHLBHL where Well_ID =91229

View 4 Replies View Related

Modules & VBA :: How To Compare Time

Aug 12, 2014

The following code gives me error message. There is problem in Format function. How can I write using VBA that "Scantime is less than 08:00"

Code:
strsql = "SELECT Count(BatchNo) AS CountOfBatchNo " _
& "FROM Table1 " _
& "GROUP BY ScanDate " _
& "HAVING ScanDate=" & J & " and Scantime< format("08:00:00","hh:mm:ss")

View 10 Replies View Related

Modules & VBA :: Text Box To Show Time Taken?

Feb 26, 2015

I have some vba that ends with a text box being displayed that says "file created"

I would like to add to that text box how long it took.

My initial thoughts are to add to the start of the code a variable that stores the current time (stTime)

and at the line before the text box is shown get the time again (endTime) and subtract one from the other to get the time taken in mins and sec

View 6 Replies View Related

Modules & VBA :: SQL Date / Time Identifier?

Mar 3, 2015

i am having an issue with sql in vba using a variable for a date time field.

i know you identify date variables with #
i know you identify text variables with '

But now i have a date time field that is set to date but when i run the sql it does not find a match. i have confirmed that both rec and ercd match.

Also, when i change the table to text, i am able to match with single quote but i would like to keep the table as date if i can.

Below is the sql statement in question

isql = "SELECT * FROM Table1 WHERE from = '" & nm & "' AND rec = #" & ercd & "# AND sub = '" & esub & "'"

View 5 Replies View Related

Modules & VBA :: Run-time Error 438 In 2010

Mar 1, 2014

Previously my snapshot file was displaying thur this code but as 2010 Access, it produded subjected error and halt at below red color line.

Public Function LoadSnapshotFile(snpCtl As Object, strFilePath As String) As Boolean
Const conSnpFinishedDownload As Integer = 4
With snpCtl
.SnapshotPath = strFilePath

[Code]....

And it was runing well. But not now due to the produced error. I tried to make it pdf extension of the report file. It is updating the file at the path (where I kept the report) but problem is not displaying after click event on the form.

View 3 Replies View Related

Modules & VBA :: Time Field Selection

Jun 11, 2013

I have a table with several fields including the following 3 fields:

dtmAppoint Date = stores appointment date
dtmAppointTime = stores appointment time
lngAppointDoctorID = stores doctor's id for specific appointment

When I enter a new appointment, I want to know whether a specific combination of these 3 fields already exists. The doctor is actually a dentist and maybe another appointment has already been placed for the same dentist on a different chair. Creating a recordset as indicated below works but I am having some problems with comparing Time (dtmAppointTime). The following works but I need to extract Hour, Minute and Second and put it into string variable strTimeDum.

Code:

rstSearch.Open "SELECT * FROM tblAppointment " _
& " WHERE (clng(dtmAppointDate) = " & CLng(rst!dtmAppointDate) & " )" _
& " AND (dtmAppointTime = #" & strTimeDum & "#)" _
& " AND (lngAppointDoctorID = " & lngAppointDoctorID & ");", CurrentProject.connection, adOpenKeyset, adLockPessimistic

Any way to retrieve the records that correspond to the specific time or a simpler way to access the records of interest?

View 10 Replies View Related

Modules & VBA :: Run Time Error 91 - Print To PDF

Aug 3, 2013

I have created a report in Access for around 800 uniquely identified line items. My end goal is to develop a script that will Print a PDF for each unique identifier and save them all in one folder and have each one named by unique identifier. Below is the script I have written, I cannot get through the Run-Time Error 91. The data is being derived from a SQL database.

Private Sub Command35_Click()
Dim rst As ADODB.Recordset
Set rst = Currentdb.OpenRecordset("SELECT DISTINCT [Unique_Identifier] FROM [tbl_questionnaire] ORDER BY [Unique_identifier];", dbOpenSnapshot)

[Code] ....

View 5 Replies View Related

Modules & VBA :: Automatically Update Time

Jan 25, 2015

I have a form fmrClasses and what I'm trying to do is write a code that as soon as the user types a beginning time will update the end time to 3 hours later for example If user enters 9:00AM for beginning time the end time will be set to 12:00 pm.

View 9 Replies View Related

Modules & VBA :: Run A Macro At Specific Time Of Each Day

Dec 9, 2013

I would like to have a macro run at a set time each day. I hoped to use .ontime but apparently that doesn't exist in access.

The macro must run at 10:00am each day, the db will be open from 8:30am until 16:30pm so no problem from that point of view +/- a few mins when the staff arrive.

View 4 Replies View Related

Modules & VBA :: Stop Prompt After One Time

Feb 22, 2015

This code puts pdf reports into a folder . I am prompted for a number via the query I run because I have more than one report the query asks me 3 times. Could this be modified so I only get prompted once for all the reports in the code

On Error GoTo Err_Handler
Const FOLDER_EXISTS = 75
Const MESSAGE_TEXT1 = "No current invoice."
Const MESSAGE_TEXT2 = "No folder set for storing PDF files."
Dim strFullPath As String

[Code] .....

View 6 Replies View Related







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