Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 11-11-2007, 04:57 AM
Junior Member
 
Join Date: Oct 2007
Posts: 4
iTrader: (0)
Ginger is on a distinguished road
Default Date and/or Time field formatting

Hi,
I have a date/time field being used to produce a unique Work Order number (based on creation date/time) format is set to yyyymmddhhnn

ex:200602151413
indicates that the WO was created 2/15/2006 at 2:15 pm
(2006 02 15 1413)

However, the following occurs:

20060217853 (2/17/2006 at 8:53 am) 2006 02 17 853

Is there a way to force the time to 4 digits as in 200602170853?

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-11-2007, 05:01 AM
Junior Member
 
Join Date: Oct 2007
Posts: 5
iTrader: (0)
Imagineer is on a distinguished road
Default Setting a subform to show the most recent entry

Hi,
I have a database that features a subform which is set to display in form mode, and I want to be able to have the subform display with the most recent record entered. Any suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 12-04-2007, 05:13 PM
Jerlene's Avatar
Registered Loser
 
Join Date: Dec 2007
Location: USA
Posts: 253
iTrader: (0)
Jerlene is on a distinguished road
Send a message via AIM to Jerlene Send a message via MSN to Jerlene Send a message via Yahoo to Jerlene
Default

Well there is this code:
Quote:
DoCmd.GoToRecord acForm, [F-MAIN].[FORM-SUB], acNewRec
and this code:
Quote:
Me.Your Subform Name.SetFocus
DoCmd.GoToRecord , , acNewRec
If they don't work, try the following:

You can control this either on the RecordSource of the subform, or "on-the-fly" from the main form.

Quote:
Dim strSQL as String

strSQL = "Select * From MySubFrmTable Order By MyDateField Desc"

Me.YourSubFormName.Form.RecordSource = strSQL
Me.YourSubFormName.Requery
__________________
Jerlene | Smoke Site
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 12-07-2007, 09:04 PM
Member
 
Join Date: Oct 2007
Posts: 41
iTrader: (0)
TonyES is on a distinguished road
Default

Hi Ginger,
When I use Format(now(),"yyyymmddhhnnss") I get 20060217084030.

If the field is actually a date/time field, you are always storing a value like 38765.363275463 .It doesn't make any difference what the format is when storing the value. The format is for display purposes only. I usually only set the format in places where a user will see the value such as in report or form controls.
As I stated earlier, if the field is a date field, it will not be storing the value 20060217084030. That value would be billions of years into the future (I think) since today is store as about 38766.
Cheers!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 12-07-2007, 09:08 PM
Member
 
Join Date: Oct 2007
Posts: 41
iTrader: (0)
TonyES is on a distinguished road
Default

Hi Imagineer,
Create a query that orders the records in the table in descending order on ID, and use the query as record source for the subform. See whether you might have clicked on the wrong place and got the wrong property page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 12-11-2007, 12:19 AM
Junior Member
 
Join Date: Oct 2007
Posts: 5
iTrader: (0)
Imagineer is on a distinguished road
Default Problems with popup calendar

I want to build a pop up calendar that will show up when I try to put in a date for vacation. Now, I have 2 fields in my table...one for start date and one for end date, as this database will be used to track all dates requested off, and have built a form for the time off request. I have 2 forms build that have calendar controls on them...my problem right now is that when i (the cursor) enter the control and the calendar form pops up, it doesn't go away. I know that means i have my macro in the wrong event. And, I can't remember how to tell the control on the request form that the value that should show there is equal to the date I clicked on in the calendar pop up...I have been able to do that in the past and am totally drawing a blank as to what I did and what I am missing now...I've been staring at this and we all know how that goes... I tried using just a date and time picker, but I keep getting an error message that says it can't use what was selected if the check box property is set to false. Like I said, I am probably missing the most simple of steps, my brain is just so worn out on this Sunday night, I needed to call in the cavalry smile Any help would be greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 12-12-2007, 04:23 AM
Member
 
Join Date: Oct 2007
Posts: 41
iTrader: (0)
TonyES is on a distinguished road
Default

Hi,
It should be possible to use only one popup form for both dates or you can put the calendar on the form itself.
Cheers!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 12-12-2007, 04:45 AM
Junior Member
 
Join Date: Oct 2007
Posts: 6
iTrader: (0)
NewBridge is on a distinguished road
Default Storing multiple values

Hi to all,
I am trying to set the value of a list box to an existing table, Where I'm not having a problem is getting the database to store the data I have selected in my list box, which allows multi-selection. The purpose of the form is to input inventory that will also have keywords stored about each item to allow for keyword searches. My inventory table has a keyword field in it...my keyword table just has all the fixed keywords that would be assigned to an inventory item...again, will have multiple keywords for one item. Any suggestions would be greatly appreciated.
With regards,
Bridge
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 12-12-2007, 05:05 AM
Junior Member
 
Join Date: Oct 2007
Posts: 7
iTrader: (0)
Hippo86 is on a distinguished road
Default Unable to delete graphic

I am trying to delete a Microsoft WordArt graphic from a form and get the error message. Any suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 12-12-2007, 09:37 AM
Help-Desk's Avatar
Senior Member
 
Join Date: Apr 2007
Posts: 154
iTrader: (0)
Help-Desk is on a distinguished road
Default What's the error message

Please provide the complete error message and error codes if anny.
Then you may be able to look it up.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 09:11 PM.