PC Review


Reply
Thread Tools Rate Thread

Change Date Problem!

 
 
Bob V
Guest
Posts: n/a
 
      11th Jul 2007


When the date appears in my text box on today's date and then I want to
change it to a new date , it turns black and today's date appears again, but
if I do it again the new date change stays on every second attempt!
thanks for any help here............Bob


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      11th Jul 2007
Hi Bob,

Check the code behind the form to see if there is something happening on an
event either on the entire form or that text field.

Other than that, maybe some table or form validation rule is messing with
things.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"Bob V" wrote:
>
> When the date appears in my text box on today's date and then I want to
> change it to a new date , it turns black and today's date appears again, but
> if I do it again the new date change stays on every second attempt!
> thanks for any help here............Bob

 
Reply With Quote
 
Bob V
Guest
Posts: n/a
 
      12th Jul 2007
Hi Jerry , The 2 text boxes that enter the date are cbRemark & tbRemark if
you enter data into them it puts todays date into dtDate
Its when you go to change that date to another when the problem
occurs..........Thanks for the Help...Bob

Private Sub cbRemark_AfterUpdate()
If cbRemark = "" Or IsNull(cbRemark) Then Exit Sub
Dim recRemarksAdd As ADODB.Recordset
Set recRemarksAdd = New ADODB.Recordset

recRemarksAdd.Open "SELECT * FROM tblRemarksAdd WHERE RemarkID='" _
& cbRemark.value & "'", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
If recRemarksAdd.EOF = True And recRemarksAdd.BOF = True Then
Exit Sub
End If
tbDate.value = Format(Now, "dd-mmm-yy")
tbRemark.value = recRemarksAdd.Fields("Remark")
recRemarksAdd.Close
Set recRemarksAdd = Nothing
End Sub



"Jerry Whittle" <(E-Mail Removed)> wrote in message
news:1E1CB816-8099-4063-813F-(E-Mail Removed)...
> Hi Bob,
>
> Check the code behind the form to see if there is something happening on
> an
> event either on the entire form or that text field.
>
> Other than that, maybe some table or form validation rule is messing with
> things.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
> "Bob V" wrote:
>>
>> When the date appears in my text box on today's date and then I want to
>> change it to a new date , it turns black and today's date appears again,
>> but
>> if I do it again the new date change stays on every second attempt!
>> thanks for any help here............Bob



 
Reply With Quote
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      12th Jul 2007
Well it isn't so strange now. The code is changing the date. Not knowing the
business rules or what is being attempted, (plus I'm not much of a coder), I
can't really say what to do to change the code. The problem and solution is
in there somewhere though.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"Bob V" wrote:

> Hi Jerry , The 2 text boxes that enter the date are cbRemark & tbRemark if
> you enter data into them it puts todays date into dtDate
> Its when you go to change that date to another when the problem
> occurs..........Thanks for the Help...Bob
>
> Private Sub cbRemark_AfterUpdate()
> If cbRemark = "" Or IsNull(cbRemark) Then Exit Sub
> Dim recRemarksAdd As ADODB.Recordset
> Set recRemarksAdd = New ADODB.Recordset
>
> recRemarksAdd.Open "SELECT * FROM tblRemarksAdd WHERE RemarkID='" _
> & cbRemark.value & "'", CurrentProject.Connection, adOpenDynamic,
> adLockOptimistic
> If recRemarksAdd.EOF = True And recRemarksAdd.BOF = True Then
> Exit Sub
> End If
> tbDate.value = Format(Now, "dd-mmm-yy")
> tbRemark.value = recRemarksAdd.Fields("Remark")
> recRemarksAdd.Close
> Set recRemarksAdd = Nothing
> End Sub
>
>
>
> "Jerry Whittle" <(E-Mail Removed)> wrote in message
> news:1E1CB816-8099-4063-813F-(E-Mail Removed)...
> > Hi Bob,
> >
> > Check the code behind the form to see if there is something happening on
> > an
> > event either on the entire form or that text field.
> >
> > Other than that, maybe some table or form validation rule is messing with
> > things.
> > --
> > Jerry Whittle, Microsoft Access MVP
> > Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> >
> > "Bob V" wrote:
> >>
> >> When the date appears in my text box on today's date and then I want to
> >> change it to a new date , it turns black and today's date appears again,
> >> but
> >> if I do it again the new date change stays on every second attempt!
> >> thanks for any help here............Bob

 
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
date in Cell to change colors if the date is beyond today's date Pete Elbert Microsoft Excel Misc 2 6th Jun 2009 06:31 AM
Problem using CDO to change Due by date in custom form DArhelger Microsoft Outlook Form Programming 1 4th Nov 2004 06:28 AM
Date and time change problem angela Windows XP Configuration 1 21st Aug 2004 05:34 AM
Calendar Control - Problem with Selected Date Change - Have to Press Twice Michael England Microsoft ASP .NET 0 26th Nov 2003 05:02 PM
Problem with date change when writing to CD-RW tlawrence Windows XP Customization 1 26th Jul 2003 08:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:35 AM.