473,394 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

vba help required

i want to know how to add live time that updates every second while your on the form

second thing i want to ask is that i have a listbox which has valuelist as data type and i am using sql query to find the data and storing the data in record set and then using a loop i am going through each and every data and adding it to the list box

the listbox has 4 column

1st is id, second is name, third is qty, and last one is unitprice.

i want to do total of (qty*unitprice) for every record in the recordset

thank you in advance :)
Apr 6 '10 #1

✓ answered by missinglinq

Here's a thing I use that addresses your first question. You'll need a textbox called txtOmega (yeah, I'm a watch fanatic) and you'll maybe want to add some cosmetics to it, like a frame around it. If you'd also like to show the date, add a textbox called txtDayRunner and uncomment the line

'Me.txtDayRunner = Date 'Display date

Goto your form's property box. Under the Event Tab find Timer Interval and enter 1000.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. 'Displays while waiting for timer to crank up    
  3.      Me.txtOmega = Time 
  4. End Sub
  5.  
  6. Private Sub Form_Timer()
  7.     Me.txtOmega = Time 'Display time
  8.    ' Me.txtDayRunner = Date 'Display date
  9. End Sub
Welcome to Bytes!

Linq ;0)>

1 1316
missinglinq
3,532 Expert 2GB
Here's a thing I use that addresses your first question. You'll need a textbox called txtOmega (yeah, I'm a watch fanatic) and you'll maybe want to add some cosmetics to it, like a frame around it. If you'd also like to show the date, add a textbox called txtDayRunner and uncomment the line

'Me.txtDayRunner = Date 'Display date

Goto your form's property box. Under the Event Tab find Timer Interval and enter 1000.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. 'Displays while waiting for timer to crank up    
  3.      Me.txtOmega = Time 
  4. End Sub
  5.  
  6. Private Sub Form_Timer()
  7.     Me.txtOmega = Time 'Display time
  8.    ' Me.txtDayRunner = Date 'Display date
  9. End Sub
Welcome to Bytes!

Linq ;0)>
Apr 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gregory (Grisha) Trubetskoy | last post by:
My humble $0.02: From http://www.python.org/doc/current/lib/optparse-terminology.html: The phrase "required option" is an oxymoron; the presence of "required options" in a program is usually a...
1
by: Bennett Haselton | last post by:
I want to get an ASP.Net hosting account with my ISP, and I'm trying to find out what level of access to the server is requried in order for me to view the server in Server Explorer in Visual...
5
by: Lorenzo Bolognini | last post by:
Hi all, i need to detect whether a field is required or not. I'm using this code for building a string to convert later to an array (by Split) of which each element matches the field index (ex....
6
by: yzzzzz | last post by:
Hi, In which cases is the <?xml version="1.0" encoding="UTF-8"?> processing instruction required at the beginning of an XML document, for the document to be valid? e.g. does it depend on the...
16
by: Georges Heinesch | last post by:
Hi. My form contains a control (cboFooBar), which has an underlying field with the "Required" property set to "Yes". Now, while filling out all the controls of the form, I have to fill out this...
2
by: bufbec1 | last post by:
I am pretty good with Access, but do not understand VBA. I have researched this topic and see only VBA answers, so I hope someone can help with my specific question. I have 2 fields for an...
3
by: Orchid | last post by:
Hello All, Hope someone can help me on my required field problems. I have a form base on a table for users to input new Employees. There are 4 fields that cannot be Null when entering new...
3
by: CindyRob | last post by:
I am using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, with hotfix 82202, Visual studio .NET 2003 with hotfix 823639. I have generated a proxy class using wsdl.exe from a schema that has an...
11
by: Naeem | last post by:
I have a Javascript function, which changes a text field of a form into a select field. Following is the function function changeStateField() { var myForm =...
1
by: KMEscherich | last post by:
Hi there, am wondering if there is a way to have this code capture 2 dates. You see, I have several fields and some are REQUIRED fields and some are NON-REQUIRED fields. I am attempting to capture...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.