Solved

Real time form.

Posted on 2011-03-24
2
305 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
Comment Utility
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
Comment Utility
the information wasnt that clear
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now