default value for one field based on another

I have a form with two date fields on it - Service Date and Posted Date.  
Since in most cases the Service Date will be the same as the Posted Date, I 
have the default value of Posted Date field set to the value of the Service 
Date field by using the following expression in the default value property:  
=[ServiceDate].  It's not working though and I'm not sure why.
0
Utf
5/5/2010 3:34:11 PM
access.formscoding 7494 articles. 0 followers. Follow

2 Replies
1738 Views

Similar Articles

[PageSpeed] 25

Try this in the AfterUpdate event of the first date:

Private Sub Date1_AfterUpdate()
   If Nz(Me!Date1, "") <> "" And Nz(Me!Date2, "") = "" Then
      Me!Date2 = Me!Date1
   End If
End Sub

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they 
eat for a lifetime".


"Tara" wrote:

> I have a form with two date fields on it - Service Date and Posted Date.  
> Since in most cases the Service Date will be the same as the Posted Date, I 
> have the default value of Posted Date field set to the value of the Service 
> Date field by using the following expression in the default value property:  
> =[ServiceDate].  It's not working though and I'm not sure why.
0
Utf
5/5/2010 4:04:01 PM
How are you expecting it to work?  A default value only applies to a new 
record so does ServiceDate have a default value too?  In this case just give 
your PostedDate control the same literal default value as your ServiceDate 
(although =[ServiceDate] should work too)

If you want the PostedDate to default to the ServiceDate after it has been 
chosen then use the AfterUpdate event of the ServiceDate control to set the 
PostedDate value.

HTH

"Tara" <Tara@discussions.microsoft.com> wrote in message 
news:85D22B69-A963-446C-BE4B-B1EAA3F3C4AB@microsoft.com...
>I have a form with two date fields on it - Service Date and Posted Date.
> Since in most cases the Service Date will be the same as the Posted Date, 
> I
> have the default value of Posted Date field set to the value of the 
> Service
> Date field by using the following expression in the default value 
> property:
> =[ServiceDate].  It's not working though and I'm not sure why. 


0
Jon
5/5/2010 4:07:07 PM
Reply:

Similar Artilces:

One Note-Vista OS--
I receive the following message "this operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator." All of my hyperlinks are disabled! I have tried several suggestions but am not am to fix the problem. I can not put my finger on any situation that would have caused it. I would appreciate any help that one would offer. One note is not too effective with out the use of hyperlinks... Dick Adams email: rsajr1@bellsouth.net Vista OS--Internet Explorer 8. -------- Original-Nachricht -------- &g...

adding SBS2008 other email domain and making it default
Hello How to add an additional email domain and make it default for Exchange 2007? Thanks! Look up: New-RecipientDomain Get-EMailAddressPolicy New-EMailAddressPolicy Set-EMailAddressPolicy -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." .. "Ronald" <2omikk@gmail.com> wrote in message news:uOf%23x$$nKHA.5520@TK2MSFTNGP05.phx.gbl... > Hello > > How to add an additional email domain and make it default for Exchange > 2007? > > Thanks! > We have a dedicated group for SBS...

workplace default pane default tab
Hi, Strange as it may seem, some users cannot find "Default tab" and "Default pane" to customize in the General tab of the Workplace (either in Client or Web Access). Even those who already used it, do no find it anymore. How can this be achieved (customization / programming)? Thanks a lot. ...

state field Bank Management
The 'state' field is not currently available for Bank Management when modifying a cheque layout in report writer. Need to be able to pick this field up. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsG...

Form defaults
Hi, I have a button on a form that disables and rearranges controls. I think I went into design view it it pressed and that control arrangement became the default. I cannot change it back though. I tried clicking the button twice and everything goes back to how it should be in form view. Then when I go to design mode everything goes to the wrong defaults. I hope that makes sense. Thanks for your help. ...

formula to return value from a matrix
hi Filtering is not an option :) I have a table that shows skill titles across the columns e3:cz3 and staff names down c4:c103, for each name and skill there will be a value between 1 & 4 see example below C E Name Excel Colin 3 I need to insert the finding into a bespoke report that if I select a skill (from a drop down list) the report will list the names and associated value Skill title drop down is k5 name is k8, skill value is j8 Cheers in advance Indicatively, perhaps a basic Index(area, match(row),match(col)) ...

VBA to colour table cells and add values when a function key is pr
I have a VBA application that teachers can use to mark assignments by placing their cursor in a particular cell in a table then pressing function keys. Each row in the table corresponds to a specific performance standard (and contains a mark) and the last column is used to store the total marks. If the teacher places the cursor in a row and presses F6 then that row is coloured and the mark is inserted into the last colum in that that row. You can see a screen image at http://emarking-assistant.baker-evans.com/screen_image.htm Currently the VBA does not need to know what row or...

User Defined Fields--Employee Maintenance Screen PR & HR
In looking through the table/field descriptions I do not find the additional user defined field names associated with the PR/HR modules. When I tried to run a smartlist and attach the fields they do not appear in the window as available fields/columns. I have modified the labels and need to run reports on those specific user defined fields. Has anyone created such a report? If not, where can I locate the field names? I am a new user to this system and any assistance someone could provide would be helpful. Hi, Since there are several places with user defined fields availab...

addition with a maximum value
I have the following code =SUM(D10+E10) but I don't want the results to display anything over 20. How do I accomplish this -- djarcadia ----------------------------------------------------------------------- djarcadian's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1587 View this thread: http://www.excelforum.com/showthread.php?threadid=31496 Try this =IF(SUM(D10+E10)>20,20,(SUM(D10+E10-20)) -- scottymellot ----------------------------------------------------------------------- scottymelloty's Profile: http://www.excelforum.com/member.php?a...

Multiple Ranges against one Domain
I used to be able to do this but now I can't seem to find the functionality I would like to plot multiple ranges (y-values) against a single range (x-values) example: Y[1]: 1, .89,.56,.45,.25,.02 Y[2]: 1,.87,.45,.35,.20,.05 .. .. .. Y[n]:1,.82,.83,.32,.04,.04 Plot each Yset against one range (x-set) X[1]: 3.45,3.15,2.56,1.22,.789,.45 I can brute force it: source data-> add series -> select x-data -> select y-data[1]........ but I have 100's of ranges all to plot against the same domain, all against X[1] Thanks in advance If you start with your data arranged a certain way...

Printing multiple worksheets on one page #3
Is this possible. I need to print 4 worksheets on one large page and print from the plotter. If not possible, any suggestions? Help . . . > Is this possible. I need to print 4 worksheets on one large page and > print from the plotter. If not possible, any suggestions? Help . . . One way is to use MS-Word. Insert a 2x2 table in a Word document. In each cell of the table, use either Insert >> Object >> Create from file or Insert >> Object >> Create new >> Microsoft Excel Worksheet If the ranges are smallish.... You could insert a new worksheet...

Sumproduct a column where 2 adj text columns contain same value
Hi, I'm using a sumproduct formula to ascertain the number of times that a value between 0 and 1 occurs in column A (range A3:A26), where the adjacent cell in column B (B3:B26) contains either "Smith", "Draper" or "Jones": =SUMPRODUCT((A3:A26>0.00)*(A3:A26<1.01)*(B3:B26={"Smith","Draper","Jones"})) This formula works fine and details the number of entries where the value in column A is between 0 and 1, and the name in the adjacent column B cell is Smith Draper or Jones. What I need to do is the same SUMPRODUCT of 0-1...

Default Catagory
Is ther a way in Outlook 2002 and 2003 to set a default catagory to all new Calendar items when they are created i.e. "Work" and then add any others you require? Also can you add a catogory to all the existing items in the calendar again "Work" in one go without destorying any existing catogories? Thanks Shane ...

Change default outlook calendar
I just went from outlook 2002 to outlook 2003 pro. I now have a default calendar that I would like to delete because of all of its errors (duplicates, etc.) and replace it with a clean copy of an alternative calendar. How? David <anonymous@discussions.microsoft.com> wrote: > I just went from outlook 2002 to outlook 2003 pro. > > I now have a default calendar that I would like to delete > because of all of its errors (duplicates, etc.) and > replace it with a clean copy of an alternative calendar. > How? Create a new PST and set it to be your default delivery locat...

Change default font and size for comments?
Does anyone know how to do the above? Many thanks Anita Hi Anita! Right-click on the desktop > Properties Appearance tab > Item dropdown, select Tooltip Choose a font Size, click OK You'll see that you can change the font and colour as well. -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au To change the default font size (this will also change the settings for tooltips in Excel and other programs): Right-click on the desktop, and choose Properties On the Appearance tab, click Advanced. From the Item dropdown, choose Tooltip Choose a font ...

Pivot table truncating values
I have a problem when creating pivot tables based on large amounts of data (for example 28MB). The pivot table truncates certain fields that appear as numeric, but are text, such as an account number. Does anyone have any ideas, or had this happen to them? ...

#VALUE! PivotTable Error
I'm using Excel as a front end for an OLAP cube. I'm getting a #VALUE! error in an Excel Grand Total for a column when I filter on a row dimension. With the filter off, the error disappears. The error is in a total number of <> cell as well as in an Average/<> cell. The cells have valid values in them with the filter off. Any ideas?? Thanks!! Filter On: Award Type Data Total Institutional Average Need Avg Award $416.00 Avg Award$/Recipient $832.00 Avg Family Income/Recipient Avg SAT Award Amount $832.00 Number o...

How does one change the alignment of characters?
I'm trying to increase the font size in a word with each letter that I type. So, for example, using my name, Craig, I would like to make the 'r' bigger than the 'c', the 'a' bigger than the 'r', and so on to the end of the word. BUT, I also would like to de-align the font so that the letters are centered in relation to one another, and not all resting on the same line. Thus, the bottom of the 'r' would be below the bottom of the 'c', not on the same line with it, which is what happens if you just change the font size. Can thi...

Footer defaults
I use a consistent protocol for footers on my reports but would like those footers to exist in every file I create. Is there some way to make them the default? -- Joe S. Hi create a new workbook with this footer and save this as a template (*.xlt file) -- Regards Frank Kabel Frankfurt, Germany "Joe S." <JoeS@discussions.microsoft.com> schrieb im Newsbeitrag news:4D12465C-3586-4F79-A000-19AB582C456C@microsoft.com... > I use a consistent protocol for footers on my reports but would like those > footers to exist in every file I create. Is there some way to make them th...

Negative value in Excel
I would like value in a certain rage of cells to always be negativ without adding minus sign when enter the value. Does anyone know how t set this??? Many thanks -- Message posted from http://www.ExcelForum.com Adhanya, One solution is to put the values in straightaway (as positive), and simply make them look as though they're negative. Select the cells, Format, Cells, Number, Custom, and use something like: -General -0.00 Then in any formulas that refer to them, negate them so they will be treated as negative. Or an event macro can negate them as they're entered. -- Earl Kios...

Current date field name
Hi! We would like to create a field so our Project Managers can easily see what was supposed to start prior to today. I can't figure out what the "name" for today's date would be. Is this close to being right? IIf([% Complete]=100,"Complete",IIf([start]<today,"Late", "Not Late")) Thanks for your help! Stacey Hi Stacey, the name of today's date is 'now()'. Hope that helps! Regards Barbara Am 10.03.2010 17:46, schrieb Stacey: > Hi! > > We would like to create a field so our Project Managers...

Default organization not default
Hey, I changed my default organization of CRM. However when opening the default server URL. Still the old default organization is opened. Resetting IIS, clearing the Internet Explorer cache en even rebooting the server does not help. Does someone have more ideas?? Thx. Mirella try to disable the other organization and keep the only one . access it with default and post us if you get the error. ------ Aamir http://danishmscrm.blogspot.com/ I disabled all the organizations except the one I that needs to be de default. Opening CRM with the default URL the following error is displa...

Setting the default contact list for Outlook 2007
When I create an email message, and click on "To" to search my contact list, by default it always goes to the Global Address List. Is there a way to make my Contact List the default? "brenda" <brenda@discussions.microsoft.com> wrote in message news:FED962FD-27E7-42BA-B0CE-FEA9256DDEC4@microsoft.com... > When I create an email message, and click on "To" to search my contact > list, > by default it always goes to the Global Address List. Is there a way to > make my Contact List the default? When that Address Book window opens, click Tool...

default mail programme
Email Client: pop how do i make entourage my default email programme. See my answer in your other thread. On 30/04/2010 14:01, Digs@officeformac.com wrote: > Email Client: pop how do i make entourage my default email programme. -- Michel Bintener Microsoft MVP (Macintosh) *** Please always reply to the newsgroup. *** ...

How do I set the cell value to 0
I want the cell to change back to 0 after I type in a number and hit enter, I have a formula in another cell that uses the number I enter, but if the cell does not return to zero directly after I hit enter, it will keep adding whatever number is in the cell. Please Help! This tiny macro does what you want to cell A1, You can adapt it to any cell. Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Range("A1"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False Target.Value = 0 Application.EnableEvents = True End Sub Remember that this is worksheet code...