To display or not to display continued...

Trinb37

Registered User.
Local time
Today, 07:42
Joined
Oct 9, 2003
Messages
23
Hi,
I have this interminable problem that never seem to go away. I know what I want to be done can be done since I know that I did it once before. Here is the thing, and is is quite simple, I want to be able to display in text the data in a table as the information is being placed in the table. So at the click of a button information would be placed inthe table and at the same time be displayed on a texbox. I already have the basic setup and it seem to be working fine. Here is the code:


Private Sub Pencil_Click()
cmdClear_Click
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO Transactions " & "(TransactionDescription,TotalAmount) VALUES " & "('Pencil', '.70')"
DoCmd.SetWarnings True
End Sub

All I need to do with this is to splice in a code that will do the displaying of what has just been placed in the table, and maybe a function that will also change the font and the color of the font that I want.

I am building a virtual cas register by the way. I send the whole program so that you will have a feel of what it is like. Thank you.:eek:


~~~~~~~~~~~~~~~~~~~
James
 
Can't you just add this?
Code:
txtMyTextBox = "Pencil, .70"
txtMyTextBox.ForeColor = ??
txtMyTextBox.FontName = ??
 
I could just use that code, but then I would not be able to display whats inside of the query, if I have to type it in. I thought that it would just be easier to display what is inside the query. I have to use the query since I would not be able to do much calculation in the table (Unitprice * Price).
 
You could set a recordset to the results of your query, and loop through it to access the data one row at a time. You might lookup "Recordset" in the help file or on msdn.microsoft.com
 

Users who are viewing this thread

Back
Top Bottom