Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserts Only

Status
Not open for further replies.

eveCalypso

Programmer
Apr 29, 2003
134
GB
I have a stock transaction table.
I want a form which:
inserts new records to the transaction table
only display and allow edits on records added today.

So, in theory, I only want to display transaction records equal or greater to today, but still let Access handle the insert/update/navigation and deletion of records.

Now, my transactionDate value is part of my PK. It is a datetime value (I insert both).

How do I or should I select data from my Transactions Table in order to achieve this?
transactionDate = getdate() obviously doesn't work because all the times are different.
Also, should it be in my recordsource or only as a filter within the form?

Thank you!
EvE

 
You can format the date to only look at the parts you want with the Convert Function in sql server.

Convert(varchar(10), getdate(), 101)

In this case, the 1st part tell how many chars to hold the resulting date. The 101 is the Style and indicates how the date is formatted. I believe 101 is in the format of mm/dd/yyyy but you will need to look in help to confirm. I think a Style of 1 is mm/dd/yy.
 
I will look at this right now and see if I come right.
Thank you in advance!
EvE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top