473,406 Members | 2,345 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,406 software developers and data experts.

need help with ColumnHistory()

49
Trying to make a "white board" type feature in my database so we can share information between shifts.

I like the ColumnHistory() feature, but it seems to keep adding to the history even if you don't type anything in.

I think it has something to do with the Nz() part of the standard code, but am unsure exactly. Everytime the form is opened, it creates a new line and I don't want it to create a line unless the post button is hit...

History Text box code is:
Expand|Select|Wrap|Line Numbers
  1. =ColumnHistory([RecordSource],"Comments","[ID]=" & nz([ID],0))
  2.  
form load code is:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. On Error GoTo Form_Load_Err
  3.  
  4.     If (Not IsNull(OpenArgs)) Then
  5.         DoCmd.GoToRecord , "", acLast
  6.     End If
  7.     If (Not CurrentProject.IsTrusted) Then
  8.         Exit Sub
  9.     End If
  10.     Comments.Value = " "
  11.     txtComments.Visible = True
  12.  
  13.  
  14.     TempVars.Add "NewData", Mid(Nz(OpenArgs), InStr(Nz(OpenArgs), "=") + 1)
  15.     On Error Resume Next
  16.     If (TempVars!NewData <> "") Then
  17.         Title = TempVars!NewData
  18.     End If
  19.     TempVars.Remove "NewData"
  20.  
  21.  
  22. Form_Load_Exit:
  23.     Exit Sub
  24.  
  25.  
I thought the "TempVars.add..." might be the cause of this, but when i commented it out, it still happens...how can I make this only store/display data if the Post button is hit?

Also would like it to not say "Version: 6/19/05..." how do i make the word "version" disappear and only the date and time show up?


thanks for your help!
Sophie
Jun 19 '15 #1
4 3750
sooli
49
oh! seems

Expand|Select|Wrap|Line Numbers
  1. Comments.Value = " "
  2. txtComments.Visible = True
  3.  
was the culprit... so that is fixed..
Jun 19 '15 #2
sooli
49
is there a way to make it display newest to oldest? so the most recent comment is at the top?
Jun 19 '15 #3
sooli
49
i got it to at least load with the cursor at the end of the text, using

Expand|Select|Wrap|Line Numbers
  1. txtComments.setfocus
  2. Me!txtComments.SelStart = Me!txtComments.SelLength
  3.  
but I'd really like to have the data appear in reverse order...
Jun 19 '15 #4
jforbes
1,107 Expert 1GB
It looks like the History is being appended to by a piece of code that hasn't been supplied. It's probably in the BeforeUpdate Event of the Form or off a button that saves off the History text. The question is whether or not when the History is saved, is it just appending to a Text field or is it creating a separate record for each piece of history.
  • If it is appending the History, then to get it in reverse order, the History would need to be prepended instead.
  • If there is a record for each piece of history, the ColumnHistory() function could be modified to allow you to supply the sort order... or just hardcoded in reverse order.

Having a peek at the ColumnHistory() function would probably answer this question.
Jun 19 '15 #5

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

Similar topics

7
by: i_vincent | last post by:
Hi all, Newbie Python programmer here, so please be patient. I have spent all day googling for an answer to my problem, but everything I try fails to work (or works from the Interpreter with a...
0
by: Adam Haskell | last post by:
Ok heres the situation: We have a linked server from SQL 2000 to a foxpro dbf. In our test enviroment we had the Foxpro and SQL server on the same machine. The linked worked perfect. Now we are...
1
by: Srinivasa Ra via .NET 247 | last post by:
(Type your message here) I am writing an application that does lot of read/write's withcomputer's serial port. The application as a whole is workingfine. Current Approach: I have a Timer that...
25
by: Mark | last post by:
I'm just starting out in an introductory ASP.Net course, and am trying to run a simple program but keeping getting an error. I'm running XP, have installed Internet Information Services (5.1) ,...
1
by: Arvind P Rangan | last post by:
Hi, I have created a class library which i need to use in my ASPX file. when i say: Dim mylib As TestLib = new TestLib() it gives me an error saying type required. How do we use a class...
0
by: saravanan_article | last post by:
Hi I am newbie to C#, i am using C# 2005 and DataGridView in my Application. The problem is described here I am using DataGrid and I placed some Headers like Column1,Column2,Column3.... What i...
2
by: manisha.patravali | last post by:
Hello, First let me explain the scenario where i m using this requirement. We are Using CustomAppWizard and designing a wizard .One of the wizard pages will Insert Composite controls as many as...
2
by: Andrew | last post by:
Hi, I am trying to write a program to solve roots using the Newtonian method of roots, and I am recieving several errors which I cannot figure out... if anyone could give me a point in the right...
8
by: rdabane | last post by:
I'm trying to perform following type of operation from inside a python script. 1. Open an application shell (basically a tcl ) 2. Run some commands on that shell and get outputs from each command...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.