Creating Time Field

Mar 6, 2006

I have a form that has two text fields "Time From" and "Time To".

I can get the current time to show up with either =Date() or = Time(). Althought when I use Date() the time shows up correctly in the field until I click on the field to edit it and then it shows the Date instead of the time until I tab out o the field. But I want the user to be able to pick another time without having to type it in. Kind of like a list box but with a scroll that with either increase or decrease the time.

Also I am trying to get the "Time To" field to be 30 minute higher than the "Time From"

I have tried different things like DateAdd("n", 30, [TimeFrom]) and although it does add 30 minutes when I click in the field it shows the Date and time (3/6/2006 12:30:00 AM) and not just the Medium Time (12:30 AM) even though I have the Conrol and the table field formated to Medium Time.

I'm at a loss.

View Replies


ADVERTISEMENT

Creating Controls On Run Time?

Feb 14, 2005

Is it possible to add a control (textbox, commandbutton) at run time, I know it's possible with VB but is it with VBA?

Thanks.

View 2 Replies View Related

Creating Time Series For Portfolio Values

Sep 3, 2007

Dear All,

once again I need your help, I have no idea how to tackle the following problem. I am taking records of stock market transactions. As a final result I want to have a query which gives me for every end of the day the total value of my portfolio.
Therefore I have two tables. The first one, called tblTransactions with columns - among others - Date, Ticker, Quantity, Price does contain my transactions. The second one, called tblQuotes with columns Date, Ticker, LastPrice contains prices for each security traded for every day.
The following SQL code gives me the portfolio holdings with the respective LastPrices on an arbitrarily chosen date (03/09/07):


SELECT T.Ticker, sum(T.Qty) AS TotQty, Q.qCl AS [Last Price], (T.Qty*Q.qCl) AS [SubTotalValue]
FROM tblTransactions AS T INNER JOIN tblQuotes AS Q ON T.Ticker=Q.qTicker
WHERE T.Date<=#3/9/2007# And Q.qDate=#3/9/2007#
GROUP BY T.Ticker, Q.qCl, (T.Qty*Q.qCl)
HAVING sum(T.Qty) >0
ORDER BY T.Ticker;


This works so far. However, now I struggle with the next step. I want to have a query, which for each date (I could use the date column of tblQuotes) adds all SubTotalValues, i.e. gives me the total value of my portfolio for each day.

Could you give me please some hints on how to proceed from here? I would be very pleased if somebody could help me with that question.

Best regards
JapanFreak

View 4 Replies View Related

Creating Admin Function To Validate Time And Task

Feb 19, 2007

Hi all,
was wondering if there was a simple way out there, or if someone could give me some ideas on how to use an admin function to either approve or deny a users time and tasks... this wouldnt neccesarily have to a be a daily function... but i would like to have this done before the end of a pay period(2 weeks).
i feel like this could be as simple as using a check box to show approval, but i wouldnt know how to have the users submission go into a place where the admin could view to approve or deny.. has anyone seen something like this done before?
thanks in advance

View 8 Replies View Related

Creating A Timer Event That Checks System Time?

Apr 21, 2005

I need a query run that brings up a list of customers that need maintence after 6 months after their last maintence service. As soon as you open the DB, the event/query runs and if there are any customers past due to display them. And if there are none, to not even show the query at all.

I have very little experience with timers and if/then statements and don't know how to set this up.

Any help would be greatly appreciated. Thanks in advance.

View 1 Replies View Related

Forms :: Add Time Value To Time Data Type SQL Server Field In Access

May 6, 2015

how to be able to enter time in access form the same way as if would be an access table (1p = 1:00 PM; 1.25 = 1:25 AM etc)

View 1 Replies View Related

Forms :: Update Time Portion Of Date / Time Field

Aug 29, 2013

I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.

View 4 Replies View Related

Tables :: Time-stamp Creating New Unwanted Blank Record

Jul 28, 2014

I am trying to do has to be done in a table and without the use of forms (becasue its what works for us) in Access 2007. I have a table where my staff records a number of different data fields for accounts. I currently have a 3 table relationship established. One of these table is our "Notes" table. My staff enters continuous notes for different accounts as new information come in.

What I have done is set my "date" field's default value to "now()" which accomplishes the time-stamp I need, but at the same time as soon as they type anything in another field in that row Access creates another row which is unwanted. follow up how can I go about also having a field that auto fills w/ the user's name/ID?

View 8 Replies View Related

General :: Creating Unique Sequential / Reference Number Every Time Report Is Printed

Feb 15, 2013

I have a rental database and I print several contacts for leases etc. what I want to do is have a unique reference number or something inserted to the report every time that it's printed. What I am trying to achieve is to keep track of which tenant corresponds to the report (Lease) printed by using reference number.

There is a seperate form which holds the tenants details and I would like to have a field on that form which would show the same reference number as the report so I can track which report was printed for who.

Whats the best/easiest way to accomplish this?

View 1 Replies View Related

Ignore Time In Date And Time Field

Mar 6, 2007

Hi,

Wonder if someone can help please. I'm quite new to Access so please bear with me.

I have a data field in my database consisting of both a date and time.

I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.

The problem is that because the field contains a time it doesn't return any records when I run the query.

Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.

Many thanks

Chris

View 2 Replies View Related

Sort By Time Only In A Date / Time Field

Mar 19, 2014

I have a column/field named [DateTaken] which contains test dates and times in the same cell. I am needing to find those with a test time less than 2:30 pm or <14:30pm.

data looks like this:

8/22/13 4:23 PM
1/29/14 12:21 PM
1/28/14 3:27 PM
8/26/13 4:27 PM

[code]....

this is what I have come up with to extract the time component of data set so that I can then later, sort it by the time in a query.

JustTime: TimeValue([YourField])
JustTime: ("hh:mm",([DateTaken])) and or ("hh:mm",[DateTaken])

I get either invalid operator or invalid syntax errors trying both of these.

View 5 Replies View Related

Inserting Time Into Access 2010 Query Field When Character Is Entered In That Field

Mar 4, 2015

Here is what I am trying to do. I have a query with 2 fields. "Time In" & "Time Out". What I would like to happen is this. Whenever a character, let's say a "t", is entered into that field I would like the current time to populate that field. Right now we are actually typing in the time. I have the fields set up as DateTime fields currently.

View 10 Replies View Related

Number In Primary Key Field Gets Increased Each Time When Jump To A New Field?

Dec 15, 2012

Assuming the following table:

Album ID AlbumTitle Song Rating
New

When I enter data, Album ID increases every time I jump to the next field. For example, when I enter: AlbumTitle, Song, Rating, Album ID is already at 4 and this is just the first record.

View 6 Replies View Related

Subtracting Date/time Field From Integer Field

Jan 2, 2007

Hello everyone, I'm encounter a problem trying to write a code.

EX:
Date Months_to_credit Final_result
01/31/06 4 10/01/05
02/28/06 6 09/01/05
03/31/06 8 08/01/05


Does anyone have any ideas how to to substract Months_to_credit from Date and to return a date in the Final_result field?

View 1 Replies View Related

Creating A SUM Field

Aug 17, 2007

I feel like this is a stupid question but here goes:

I just created a large database of which a few fields are going to represent "total" fields as they are the sum of a few other fields.

I attempted to build an expression in the "update to" box in an update query but it does not seem to be working. I tried creating a simple addition expression and it tells me that I am about to update XXX number of fields but when I look at the data afterwards no changes have taken place. I am not familiar with how to use the Sum function so it was not working for me.

I'm not sure if I'm going about this the wrong way but if someone could push me in the right direction I'd appreciate it.

Thanks.

View 5 Replies View Related

Creating A New Field

Jun 15, 2006

I am making a Make Table query where I want to add a new field called [Timesheet Date]. How do I ensure that this field is a Date type? I ultimately will populate the new field with valid dates.

View 2 Replies View Related

Creating A New Field

Jul 3, 2007

I have a first name, last name and a company name on the customer/contacts table. I would like to figure out some way to create another new field that contains either the company name or a joined first and last name if there is no company name. I am sure I have seen this ability somewhere, but I am not sure about how to go about doing it.
Any advice would be great.
Thanks,
James

View 4 Replies View Related

Converting Text Field (00:00:00) To Time Field

May 14, 2013

I need to convert a text field containing a total amount of time (example: 128:15:52 -- 128 hour, 15 minutes, 52 seconds) as a time field. The data is imported into a database as a text field.

View 3 Replies View Related

Creating New Primary Key Field

Nov 24, 2004

I think that creating a new primary key is the only solution to this problem, but I would love to have other input, including potential pitfalls I might encounter in this process.

Here is the scenario: I have spent the past year creating a "survey based" database in my "spare" time at work. The database holds detailed information about nutrition questionnaires given to children over the years that they are in our program. I have based the structure on using ClientID as the primary key. ClientID = each individual's social security number.

We have another database that holds all the client's information. This is the database where any updates are done to their information. I export the client information (firstname, lastname, birthdate, socialsecurity, plus a few more) that I need into excel. Then I import that info into my database on a regular basis using an update/append query.

We started using the database in September and all was going well until a few weeks ago when I imported data and found a name that was entered twice. On looking closer, I found that the person had two different ClientID's. How could this happen...? Well, in our other database, if a child doesn't have a social security number yet, or we weren't given it, the program creates a fake social security number AAA-##-####. I knew this from the beginning, but wasn't aware of any problem. However, I was missing a significant piece of information. When the child finally does receive a SS#, we go in and change the number in the program!!!! At first I was told this rarely happens (I had about 6 duplicates the first time), but today I ran another import and found 90 instances of duplicated names!

There are just over 600 records in the database. Many of these have had information that is unique to this database entered in a related table, so I need to be sure I don't lose any of that data. There is data in other tables that I could import again if I have to.

Here are my options as I see them:

1. Leave the primary key alone and delete the duplicated values with every update.

2. Create a new unique autonumber primary key, knowing I will have to delete relationships and rebuild them. I would leave the clientID field in the system as it is the only way we have to determine the difference between two children with the same names and birthdates.

3. Run quietly away hoping they don't notice the problem until I am long gone. ;)

What would you do in these circumstances? If you agree with my assessment that I really should create a new primary key, what steps would you take to minimize problems both during the process and in the future?

And yes, I wish about 12 months ago, I had asked if the social security number was ever updated, but of course no one thought to bring that up when we were discussing the database design! :mad:

Thanks for your help!

View 2 Replies View Related

Creating Multivalue Field

Dec 19, 2006

Hi Everybody,

I've a question that is teasing me. How would I create a multivalue/multiple answer field in access 2002. P'se forgive if this question has been asked before. Thanks in advance,

Samia

View 9 Replies View Related

Creating A New ID Field With Logic

Apr 24, 2008

I am looking for some direction on how to approach this.

I have a table that has a field call DocumentID and I don't like it. I would like to create my own.

In the same table I also have 10 fields of data called L1, L2, to L10.

I would like my new DocumentID to be the 10 fields concatenated together, with a period between them unless the value of the field is null.

If this is a query I need to then move the data back to a table in the same database.

Any suggestions on a good strategy/approach?

Thanks

View 3 Replies View Related

Help Creating A Populating Field.

Jul 9, 2007

A fellow employee of mine who is self taught in Microsoft Access currently has a database with a form that contains fields labeled name and address. She is trying to set it up so that when she begin to type, it will automatically look up to see if that name and address was previously entered to cut down on having to repeat it every time. She has tried the look up function with no success. She is using a single table as a base. Any assistance anyone can give us will be fantastic!! If I have posted this in the wrong forum or if this question was already answered, I could not locate it and I'm sorry if I am not following proper forum protocol.
Thanks!!

View 3 Replies View Related

Help Creating A Unique Numbering Field

Feb 20, 2007

Hi all,

I have been trying to incorporate an access DB in to our business for sometime, but keep coming up against the same issue. We have a numbering system for the jobs we do, which was invented many years ago and cannot be changed. It is in the format "month/Year/unique 3 digits" the 3 digits are sequential, i.e. 02/07/123 ... 02/07/124... etc. I will need this all in one field.
So far I have managed to get the month and year (easy enough) with the expression "=Month(Now()) & "/" & Right(Year(Now()),2) & "/"" Now I need to get the sequential 3 digits at the end, however, I am not sure of any way to do this and it has stumped many people. I have a field that is autonumbered, but don't seem to be able to add this to the end of the expression.

If any of you have any suggestions I would be greatful - bear in mind I am only a begginer at this.

Thanks in advance.

View 8 Replies View Related

Creating An Expression From A Date Field (Help Please)

Apr 8, 2006

I one of my tables, I have a date field (DateCompleted) with the format: mm/dd/yyyy

Now, I want to create a query which would create another field (DateExpected) by using the date in the above table and adding 5 months to the date.

The only issue is that for the new field in the query I want it just to have mm/yyyy format.

For example, if the original date in the table is 04/05/2006, after running the query, I would have a new field 09/2006.

Does anyone know the exact expression I would put in the query? Thanks. The expression would be put in the "build" area.

Thanks for your help!!

View 2 Replies View Related

Creating Field Names From The Data Within

Jul 6, 2007

Here is my problem. I have created a dbase that takes a download of financial data on a four weekly basis to produce an report for my users. The data always comes across with the same numer of columns but at each four weekly period the date moves on. To show this data in a meaningful way I need to change the field heading automatically, based on the date in the data to show the current Period and Year. The dates given in the download cannot be used as the field names as they are not in the correct format.

1/ Does my post make sense, probaly not.

2/ Can anybody help.


Spook

View 9 Replies View Related

Creating Calculated Field With Two Expressions

Aug 6, 2007

Hi guys,

I am writing a select query and need an extra column which will be calculated using two tables.

The problem i am having is that i need to to say basically, return value A if value from table x < value from table y or return value B if value from table x > value from table y.

I tried using the HAVING clause but you cant use the if function with this it seems.

Your help is most appreciated.

View 2 Replies View Related







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