Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2007, 11:34 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default Transfering enteries in the same form

I have a form with the Textboxes InstalTime(Locked) and Labortime.

InstalTime - suggested amount of time it takes to install a part
LaborTime - The Time Used to install a PArt

I need to have the default Value for LaborTime be the # that is populated in InstalTime and still be able to modify it?

I tried
Code:
InstalTime_AfterUpdate ()

if isnull(me.EstLabor) then exit sub   
me.Labor = me.EstLabor  


But that didnt seems to work.
 
Old February 16th, 2007, 04:17 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am assuming that this code is on the AfterUpdate event of InstalTime:

InstalTime_AfterUpdate ()

If IsNull(Me.LaborTime) Or Me.LaborTime = "" Then
   Me.LaborTime = Me.InstalTime
End If

Where did Labor and EstLabor come from?

mmcdonal
 
Old February 19th, 2007, 10:15 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Hah thats funny I wonder what I was thinking when I posted that. I must of had a case of the Fridays.

I have been trying to use the

InstalTime_AfterUpdate ()

If IsNull(Me.LaborTime) Or Me.LaborTime = "" Then
   Me.LaborTime = Me.InstalTime
End If

Which you suggested but it still isnt working.

I am starting to think that because the instalTime is populating when I open the form I need to place it someplace else?

 
Old February 22nd, 2007, 11:15 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

Wow I tried it again and it worked! thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfering an entry scandalous Access 1 February 13th, 2007 08:36 AM
Transfering report Hudson40 Access VBA 1 March 11th, 2005 11:00 AM
Creating and transfering data to a new form... Brettvan1 VB.NET 2002/2003 Basics 5 December 9th, 2004 05:16 AM
Transfering elements from a vector to another aldo_izzo J2EE 0 June 8th, 2004 04:44 PM
Transfering Import Specs Morris Access 3 August 15th, 2003 08:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.