Solved

Real time form.

Posted on 2011-03-24
2
311 Views
Last Modified: 2012-05-11
I have a form that looks something like this:
Start Time  Stop Time      Status Code      Incident      Incident Title
12:00           1:00                             E                         34          Standby

I need to have that form automatically go to the next line and start another line with the same format. I couldnt draw the lines,  but it should be a table format. So when they tab at the end it will start another row automatically with date/time format and all the other columns.
0
Comment
Question by:gigifarrow
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35209053
Generally you do this by capturing the values in module-level variables. For example, in the General Declarations section of your FORM, add these variables:

Private mdStartTime As Date
Private mdStopTime As Date
Private msStatusCode As String
etc etc

Now capture the values in the Form's BeforeUpdate event:

Sub Form_BeforeUpdate(Cancel As Integer)
  mdStartTime = Me.[Start Time]
  msStatusCode = me.[Status Code]
End Sub

Now, in the Current event ofy our form, check for a NewRecord and if found, add those values;

Sub Form_Current()
  If Me.NewRecord Then
    Me.[Status Code]= msStatusCode
    Me.[Start Time] = mdStartTime
  End If
End Sub

Obviously you'd have to change the names of your controls and such based on your project, and you'd have to add the other variables to handle all the items you need.
0
 

Author Closing Comment

by:gigifarrow
ID: 35212354
the information wasnt that clear
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question