PC Review


Reply
Thread Tools Rate Thread

Data entry form macro shows wrong formats

 
 
Axel07
Guest
Posts: n/a
 
      15th Nov 2009
My Excel 2007 table has columns containing dates in the format 2009-11-15 and
times in the format 14:16 ( [h]:mm ). I open a data entry form by clicking on
the form button in the Quick Access Toolbar. I insert the current date using
the keyboard shortcut Control-semicolon. The date appears in the expected
format.

I prefer to open the data entry form using the following macro, to which I
have assigned the keyboard shortcut Control-Shift-O:

Sub OpenDataForm()
' Keyboard Shortcut: Ctrl+Shift+O
ActiveSheet.ShowDataForm
End Sub

However, when I open the data entry form using the macro, the form does not
recognize the format setting in the Excel table, and displays dates in the
format 11/15/2009. Similarly, times appear in AM/PM format instead of my
24-hour format. When the form data is saved as a new entry, these unwanted
formats appear in the table.

(1) Why do the formats differ depending on whether the data entry form is
invoked by button-clicking or the macro?

(2) How should I rewrite the macro to ensure that it picks up format
settings from the Excel table?

Thanks.

David



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Professional Data Conversion,Data Formats and Affordable Data EntryServices by Data Entry India Data Entry India Microsoft Access Form Coding 0 31st Mar 2008 11:50 AM
Data Entry Form: Macro-One To Many =?Utf-8?B?UXVsbDY2NkBob3RtYWlsLmNvbQ==?= Microsoft Excel Misc 10 20th Apr 2007 01:04 PM
Can a standard data entry form be used to change formats of cells? =?Utf-8?B?QmFycnlX?= Microsoft Excel Misc 0 21st Jan 2006 03:06 PM
Create a form for macro data entry =?Utf-8?B?QmFzc2Vs?= Microsoft Access Macros 1 13th Aug 2005 09:33 AM
form data entry VERY sluggish. what's wrong? Kenabbott Windows XP Internet Explorer 6 7th Mar 2004 07:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 AM.