Date & Control Button Focus

I have a form that has the calendar in it and 3 buttons that represent 1st, 
2nd, and 3rd shift.  We input up to 50 forms per day.  The forms may be 
entered the next day.  The calendar will always go to todays date because of 
the code Now() used.  How do I make the date stay at the last date that was 
enetered?  How do I make the 1st, 2nd, and 3rd shift buttons stay at last 
shift selected after data has been entered?  This would allow the data entry 
person not to have to change date or shift if forms are grouped together.
0
Utf
7/2/2007 7:06:07 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
560 Views

Similar Articles

[PageSpeed] 12

default values
--

Hi Bill,

"The calendar will always go to todays date because of the code Now() used."

are you wanting to store date AND time?  If so, then Now() would be 
correct -- but if you just wanted a Date, the you should use Date()

"The calendar will always go to todays date"

it seeems that you are actually wanting the default value to be this:

dMax([DateField},[Tablename])

"How do I make the date stay at the last date that was enetered?"

dLast([DateField},[Tablename])

assuming that the last record entered has the date that you are looking for

.... if you provide more details about your forms and controls, we can be 
more specific

"How do I make the 1st, 2nd, and 3rd shift buttons stay at last
  shift selected after data has been entered?"

dLast([ShiftField},[Tablename])

assuming that the last record entered has the shift that you are looking for

Warm Regards,
Crystal
  *
      (:  have an awesome day  :)
   *
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
   *



Bill wrote:
> I have a form that has the calendar in it and 3 buttons that represent 1st, 
> 2nd, and 3rd shift.  We input up to 50 forms per day.  The forms may be 
> entered the next day.  The calendar will always go to todays date because of 
> the code Now() used.  How do I make the date stay at the last date that was 
> enetered?  How do I make the 1st, 2nd, and 3rd shift buttons stay at last 
> shift selected after data has been entered?  This would allow the data entry 
> person not to have to change date or shift if forms are grouped together.
0
strive4peace
7/4/2007 7:48:55 AM
Reply:

Similar Artilces:

Set Controls Default Value from another Control
I am working on a form for data entry where the user enters many records that may have similar information, i am trying to create a tab that would have all of my "Default" values so that for example if the user was going to enter 40 items from a PO they could go to the Defaults tab and enter the PO# and every record they enter on the subform would by default have the PO number entered. I have done this before where my data entry textbox controls default value is =me![DefaultNotestext] where [DefaultNotesText] is on my Defaults Tab and it is bound to a 1 record table s...

option buttons
How do you group different sets of option buttons. When I create a form with option buttons, all the buttons are linked so only one button can be selected. tia Rich, Create a Group Box, and put the option buttons inside it. For each different set of options, use a new Group Box. Dan E "Rich" <rich@jhara.com> wrote in message news:043401c38dd5$e3cf9b10$a301280a@phx.gbl... > How do you group different sets of option buttons. When > I create a form with option buttons, all the buttons are > linked so only one button can be selected. > > tia If you don&#...

Referring to Master Form Controls
Using Access 2007 I have setup nested forms. Master Form is frmOrder which has a subform frmCut which has a subofrm frmRoll. On frmCut i have a control named BiasSize On frmRoll I want to refer to the control BiasSize on frmCut I have the following code in the AfterUpdate event of another control on frmRoll: Private Sub cmdActualYardsEntered_AfterUpdate() Dim intBiasSize As Single Dim BiasMultiplier As Single intBiasSize = Forms![frmCut]!BiasSize ' Error occurs here If intBiasSize > 0 Then If intBiasSize = 1.5 Then BiasMultiplier = 43 If intBiasSize =...

pivottable date
I have dates in the column field in the following format mm/yyyy however its not sorting as it should. currently it displays like 01/2006, 04/2005, 05/2005........... 12/2005 How can it display 04/2005, 05/2005, .......12/2005 , 01/2006 please help Hi Go to Tools>Options>Lists> and create a new list of 04/2005, 05/2005, 06/2005 etc. Go back to the PT, double click on the field, choose Advanced and select Sort>Ascending again. -- Regards Roger Govier "flow23" <flow23@discussions.microsoft.com> wrote in message news:379A3CDB-1B8B-4484-A96B-591BC37F3...

How to implement a transparent button?
I'm trying to make a flat and transparent button, something similar to the TSpeedButton in Delphi. By saying transparent, I mean the background of the button is transaparent, which is quite important for those buttons on a bitmapped dialog. I have no difficulty in drawing text and bitmaps in a CButton-derived class, but transparency seems to be another thing. Any suggestions? Hello Try looking in www.codeproject.com . I am sure you might find lots of controls there similar to what you need. -- Elias "zwvista" <zwvista@discussions.microsoft.com> wrote in message news...

WM_CREATE not received in dialog's controls
Hello, I am trying to make a 3d visualization panel deriving th CButton class. For that, I need to initializa som stuff after the control (inside a dialog) has a valid HWND but before it paints itself for the first time. At first I done it programatically creating the control and placing the 3d-initialization code inside the WM_CREATE, and it worked right. But I want to create the control from a resource ID, not programatically, to avoid the need of positioning and sizing tasks. And there lays the problem: I use DDX_Control to associate the resource ID and the member variable for the ...

Initializing Correct DATE
When I open Money, and start posting transactions to my accounts, the first transaction would be dated Sept. 23, 2008 INSTEAD of October 23, 2008; In other words, I must manually override the date when entering my first transaction in my account!! I NEVER had to do this before; any suggestions as to how to repair this anomaly?? Thanks, FLKulchar In microsoft.public.money, F. Lawrence Kulchar wrote: >When I open Money, and start posting transactions to my accounts, the first >transaction would be dated Sept. 23, 2008 INSTEAD of October 23, 2008; > >In other words, I must m...

Creating Date Range in Pivot Microsoft Query
I have a pivot that I've connected to our SQL db using the MS Query. I'm having two problems with it: 1. In Access I create a date range to see dates between 3 and 15months ago with the SQL statement " WHERE (Trx.TrxDate) Between (Date()-485) AND (Date()-120)" - no problem in Access but not the MS Query program. When I do it through the Excel MS Query it says the Function 'date' is not valid. How do I describe the current date in the MS Query program? 2. In the same wizard I cannot combine two fields (in Access I would use Expr1: [Field1]&", "...

how do I get excel to format dates before 1 jan 1900
I am transcribing Parish Registers for our local church. Many entries go back to past centuries and we need to be able to search the database/table by date. Hence need date formatting prior to 1900. Any ideas? Ps Using Office 2000 XL and Access All dates previous to 1900 will be text in excel so you need to to search on text Regards, Peo Sjoblom "keithcarteruk" <keithcarteruk@discussions.microsoft.com> wrote in message news:7F81BC98-6FC6-440D-9D3B-426C47F37B4C@microsoft.com... > I am transcribing Parish Registers for our local church. Many entries go back > to pa...

Can we call functions in the Activex Control (OCX file).
In my COM Server i have added Dialog Box. i have registered OCX file and added that Activex Control to my Project also. It has created 1 header file and 1 source file. After that i have created an instance(object) of that ActiveX control and trying to call functions, But its giving run time error. Debug Assertion Filed! File: winocc.cpp Line: 345 Please help me See answer above!!!!!! AliR. <karspy@gmail.com> wrote in message news:1141820404.474541.234890@u72g2000cwu.googlegroups.com... > In my COM Server i have added Dialog Box. i have registered OCX file > and added that Ac...

Change color on date field in form for re-certification
Hello. I have two different date fields on a form, but I would like them to change color depending on how close to the re-certification date it is whenever I open the form or open a report showing the same info. On each of the date fields, I would like to have them green for anything over a month away, yellow for anytime within a month, and red for anything expired. One date field [PTDate] needs re-certified every 6 months, and the other date field [WeaponDate] needs re-certified every 12 months. I've been struggling with this for several days now and haven't been able t...

Is it possible to group parts with controls?
I created a setup sheet with controls on it. I want to group (collapse) one portion of it which will not always be used. I tried to group it but the controls did not go away when the rows were collapsed. Is it not possible to do this? I played with unlocking them, then in properties I don't have the option to move and size with cells. It's dimmed out. I don't know what controls you're using, but sometimes if you use the similar controls from the control toolbox toolbar, you'll see that move and size is available--checkboxes, for example. cho@noho.educomnetws wrote: > ...

Passing focus to target window after drop in OLE D&D
I have a dialog based MFC application which also supports drag and drop from a CTreeCtrl onto any other application that supports the drop of ASCII and Unicode text. It also supports D&D og entries from this TreeCtrl to another instance of the same application. D&D is via classes based on the standard COleDropSource, COleDataSource & COleDropTarget functionality. After the 'DoDragDrop' completes successfully, I would like transfer the focus to the Window that just received that text of entry data. Can anyone tell me how to get the handle of that target window and h...

Forcing a record write with a form button?
I have a form that has buttons that call other forms (not subforms, completely separate forms to be opened, but accessing some of the same data). When the user clicks the button on the primary form to bring up one of the other forms, I need to force the primary record to be updated to avoid a later update conflict. I know where to put the code/statement I need, but I don't know what the actual statement is to force an update of the displayed record. Thanks, +Bob+ wrote: > I have a form that has buttons that call other forms (not subforms, > completely separate forms to be opene...

Difference in years of 2 dates (COleDateTime)
Hello! I need to take the difference of two dates in years, lets say -> 12/5/2003 and 12/5/1980 now...the difference should be 23 years right? When I calculate the difference I am getting 22 years...Is there something I am not taking into consideration here? COleDateTime bday(1980,12,5,0,0,0); COleDateTime today(2003,12,5,0,0,0); int bday_day=bday.GetDayOfYear(); int today_day=today.GetDayOfYear(); TRACE1(_T("%d days\n"),bday_day); TRACE1(_T("%d days\n"),today_day); This results in -> 340 days into...

Outlook 2003 Delete Button
A user recently had Outlook 2003 reinstalled. Originally (he says) that he could click on a message in the inbox and and delete the message by clicking on the X key on the standard toolbar and that this would automatically take him into the next message. This is not happening now. Instead he deletes the message and he is brought back into the Inbox where he has to double-click on the next message to open it. Is there a way to set this delete command so that after it deletes it automatically goes to the next message in that same window withour having to go back into the inbox agai...

How do I change the date format in a pivot chart from numbers to a
...

ListBox control over other controls paint problem
I'm putting a Listbox control over other controls in my form; but when i run the application and click on the controls that are partially hidden by the Listbox, these controls go on foreground and ruin the paint of the Listbox... How can i avoid this?? Thanks First say why do you want controls behind the listbox? Maybe you want to hide the controls behind the listbox instead? Ali R. "michele" <mandelbort@oggiweb.com> wrote in message news:LXzMb.245653$vO5.10164448@twister1.libero.it... > I'm putting a Listbox control over other controls in my form; but when i r...

Task for parts and material delivery dates
This is a "best practices" type of question by a novice Project user. I'm help a machine shop get started with project management using standalone Project 2003. This question involves planning for ordering parts and materials (e.g. aluminum) and the associated lead times and delivery dates. In some cases, a very long lead time for a part will have a "delivery date" associated with it; e.g. we can't get that part until the first week of the second quarter. I think this example would also help me in the case where projects are already underway and material...

Tab Control 03-02-10
Hello, I'm using Access 2003. I have a form with a tab control. I want to have another tab control within one of the page of the main tab control. So when you go to a certain tab, I'll see 3 sub pages. Is this possible? I can't seem to drag a new tab control onto a existing page of the main tab control. Thanks "Don" <Don@discussions.microsoft.com> wrote in message news:FC333288-EF03-45F3-862D-D2D58C12461A@microsoft.com... > Hello, I'm using Access 2003. I have a form with a tab control. I want > to > have another tab control ...

Add new event manually to a control of mine.
Hello. I want to make a new event manually to a control of mine. I overrided the control : DataGridView, and want to add a new event (and also call the event on some of my methods). How can I do the above ? Thanks :) Also change the parameters, that are sent to the control. Thanks :) "Mr. X." <nospam@nospam_please.com> wrote in message news:#bQ1kcOALHA.2332@TK2MSFTNGP04.phx.gbl... > Hello. > I want to make a new event manually to a control of mine. > I overrided the control : DataGridView, and want to add a new event > (and also call the even...

Cant Connect To Remote Doamin Controler
Hello, My Os Is Windows Server 2008 R2 Enterprise I have a Cloud Server (Windows Server 2008 R2 Enterprise)that I Pay Monthly For and I Need to setup active directory on it so my remote computers can login useing active directory but it seems i cant connect to the domain controler. Get The Following Anwser: The following error occurred when DNS was queried for the service location (SRV) resource record used to locate a domain controller for domain remoteoffice.joescomputersupportinc.com: The error was: "DNS name does not exist." (error code 0x0000232B RCODE_NAME_ERR...

These project configuration(s) are ALWAYS out of date
I tried to post this earlier today, but I dont even see it in my sent items box. I have no idea what happened, so I'll try to post it agian. Whenever I hit F5 to run my program, it always has to rebuild. Of course, everything is the same because I have JUST built the whole thing. I read into this bug and saw that a lot of people who ported VC6 apps to VC.net had this problem. I am using VC.net2003. This program was started with it and worked fine in it until this morning when this bug hit me out of nowhere. Has anyone else experienced this? It is annoying and time consuming. jorj ...

Q: regarding voting buttons...
Hi, One question :) Is it possible to make 3 votingbuttons (24/12, 25/12 or 26/12) where if I choose 24/12, it writes in/books my calendar at the same time. I hope this makes sense? :-) Cheers /Rico No one knows or? Cheers /Rico >-----Original Message----- >Hi, > >One question :) > >Is it possible to make 3 votingbuttons (24/12, 25/12 or >26/12) where if I choose 24/12, it writes in/books my >calendar at the same time. > >I hope this makes sense? :-) > >Cheers >/Rico >. > ...

Report By Date 04-10-07
I have to run a report for each days sales, the problem is that each "Day" starts one day and ends the next. I now have the date of creation for each record this doesn't seem to be enough, because that doesn't clarify which day the record belongs, today or yesterday! Are there any suggestions on how I might do this? Thanks DS How do you determine which date it is? If you have a date/time field named SaleDateTime, and you need to subtract 10 hours from the SaleDateTime field to get it into the correct date, type this into the Field row in query design: Effective...