Modules & VBA :: On Click Of Checkbox - Adding Notes To Memo Field
Feb 5, 2014
I have code which is attached to onclick of a checkbox,
What I want it to do is if the user clicks it and checks it then to add some note to a memo field, if the user clicks it and its already checked then it doesn't add a note to a memo field.
Code:
Private Sub Check45_Click()
If Check45 = 0 Then
Check45 = 1
If Len([Forms]![Customer]!Notes.Value & "") = 0 Then
[Code] ....
But I can't seem to add any other lines which make sense to me that it doesnt add "letter sent" to a memo field if its already checked?
View Replies
ADVERTISEMENT
May 31, 2012
How to I can to add contact with field "Notes" (Type: Memo) in MS Access to field "Notes" in Outlook contact
Is it below ???
item.Notes = varNotes & ""
View 8 Replies
View Related
Oct 13, 2013
I receive mails through LN and loop through a certain folder, reading DeliveredDate, Body, Subject and writing those items into an Access-table.This works fine, before I go for the loop I put the doc in another folder and remove the current doc from the folder.
Call LNDoc.PutInFolder("SMSBackup", False)
Call LNDoc.RemoveFromFolder("SMSResponse")
Set LNDoc = LNView.GetNextDocument(LNDoc)
Loop
Without any error, without anything abnormal in the mails the code exits after a few loops, sometime after more or sometime after less read mails.The problem ist the RemoveFromFolder, not the PutInFolder function.
So to avoid this behavoir, I changed my code to finish the loop without
Call LNDoc.PutInFolder("SMSBackup", False)
Call LNDoc.RemoveFromFolder("SMSResponse")
and added after the loop a NotesCollection which should do ALL at once.But this part of the code does nothing at all (allthough found on the web).
With LNCollection
.PutAllInFolder "SMSBackup", False
.RemoveAllFromFolder "SMSResponse"
End With
The complete code looks like this:
Set objNotes = GetObject("", "Notes.NotesSession")
Set LNdb = objNotes.GetDatabase("myServer", "MyNSF")
If Not LNdb.IsOpen Then LNdb.OpenDatabase
If Not (LNdb Is Nothing) Then
Set LNView = LNdb.GetView("SMSResponse")
[code]....
View 1 Replies
View Related
Apr 12, 2013
When I click on my memo field and hit enter to go to a new line, it moves to a new record. Where do I look?
View 2 Replies
View Related
Jul 19, 2005
Getting better - but still far from being competent with VB can someone please help me with the following code.
On the On Click event of a command button I want to call up a field (from another table/form) and add A to it so it lands in a text box. So using the following example -
The table/form is called Patient and the field in question is URNumber. The form I want to put the command button is called RelatedDetails, and in a text box (IDNo) I want to put code that creatsed URNumber with an A on the end (or the beginning) Any ideas?
View 2 Replies
View Related
Jul 8, 2013
Access 2003
I have a process which imports a txt file into a memo field of my TBLORIGINAL table Each file may have one record or it may have multiple records Every record begins (exactly) with
Quote:
FRE Order Order RAD ShipDate Customer City State Postal Code
For each record in the memo field, I need to create a new record into my TBLPROCESSED table
This can probably be done while it is importing but I need to keep the original file intact
I suppose I could copy and paste but there must a vba way of doing this
View 3 Replies
View Related
Apr 11, 2015
I want to create an app that works like Wikipedia. for example any word that have an explain and that's explain available in my database that word become hyperlink text with different color and so if operator click on that word open a new form and show the explain.
View 1 Replies
View Related
Jul 21, 2014
Memo field is called [Notes] and data is like this...
5/05/14 - Perry was on another call. LM 2/05/14 - Perry only at centre in the mornings, need to speak to him before sending samples. 13/06/13 - Perry in a meeting. lm 30/05/13 - See Little Hampton Early Learning - s/w Perry, has already received sample and info 29/05/13 - s/w Aspi, said to cb tomorrow and speak to Perry
I want to find each date in the Notes field so I can split the memo field data into another table where the memo field will become multiple records that hold date, text and customer/prospect ID fields. The customer table was easy because there was a <Div> tag before each date. However in the Prospects table there are no tags so how to change my vba code to search for each date before I split off the data.
Here is the part of the VBA code I used to find the <Div> tag in the customer notes field. How to find each date in the memo field? The date is in d/mm/yy format?
If Not rst.EOF Then
Do
StrSplit = Split(rst![Notes], "<Div>")
For x = 1 To UBound(StrSplit)
View 6 Replies
View Related
Feb 10, 2015
Our quotation tool, which is built in access 2003, has a memo field, which is extracted in a .txt file, to be uploaded by another system.
When the user starts the memo field with a blank line, by hitting the enter key, the upload file writes the memo field as a new line, separating it from the line indicator and thus giving errors.
My question would be : How would I determine in VBA, whether the first line of the memo field is blank.
View 4 Replies
View Related
Apr 28, 2015
I have a subform that I use in a few different ways on my database. It has a comment log with a memo field for people to insert their comments. The struggle is some can be long some can be short. Is there any way to have each record height adjust to the length of the memo?
If it cannot be done for the subform in regular use, my main concern is having it formatted for reports that are generated for clients.
I clipped and attached an example from a report. Its not the best example but the extra column height is adding additional pages to my report to accommodate one long comment.
View 4 Replies
View Related
Jan 16, 2014
I import a CSV field which has not preserved the CR/LF when it was exported from BCM Remedy. There is no setting for that. The memo field prints on my report like this:
A custom solution would be developed, that once implemented, could become the standard product in similar situation. Normally would assign to Network Engineering, but will work with Ray and the IPT Team to cost out the solution and get approval to proceed. 2012/05/24 10:44:28 AM PCOLLINS Sent to Ray Massie for review to determine if a solution needs to be proposed, or if they can wait for the National IPT solution to be ready in 2013.
I want to add VBA code that inserts a CR/LF in the memo field before all but the first occurance of a string that looks like a date, the first occurance doesn't need it. I will do it right after I import the CSV file into the table, so it happens only once, and it always prints and displays the CR/LF.
The memo field is called "NBS Update" and the table is called "CCRR Remedy Data"Here is what I have, but don't actually know what to put in to find the date and add a CR/LF:
Code:
Dim db As DAO.Database
Code:
Dim db As DAO.Recordset
Dim srtSQL As String
[code]...
View 14 Replies
View Related
Jul 8, 2013
I had the need every so often to quickly find all instances of any (particular) word within the database, without going to the bother of thinking about where that word/subject might be in the data base, I designed a report which does the job nicely. It uses a search form/control, searches and finds all instances of the word (or words) I have asked it to find, then does a report showing all instances of whatever RTF memo fields that contain the word(s).It has to be RTF memo field because (if I wish) it goes straight into the book text I'm writing, and also it searches the book's RTF memo field.
.
The trouble is, at present, I then have to manually "eye scan" the resulting report to find the occurrences of the "key searched for" word, nestling/hidden somewhere within sometimes quite large chunks of text. I would love to have the report show the found "key word(s)" highlighted in (say) light blue or whatever colour, so that I can quickly & easily lock on to it visually.
I enter the word I want Access to find, into a form called "formfindword" in a text box called Text0. I click on a command box on this form, to open up the report called "Querywhatsandhowschooseword" based on a query of the same name. The query's "what" field (from the main database) has the criteria
= Like "*" and [forms]![Formfindword]![Text0] & "*"
The query's "how" field criteria (in the "or" line of the query design) is also
= Like "*" & [forms]![Formfindword]![Text0] & "*"
I have tried to use the Conditional Format facility in Report Layout view, without any luck.I think therefore that I will need some VBA code (which is totally foreign to me, unfortunately) to make this simple concept a reality.
View 2 Replies
View Related
Nov 25, 2013
Two Solutions to address moving an Access Memo field into Excel when string has > 255 characters. All my 'reports' use Excel VBA (Access Reports are not used). The Excel reports can have 40,000 records. Speed to create the report can be an issue.
Describing 2 Solutions below to address moving Access memo fields with > 255 characters into Excel.After running this code
Code:
720 ObjXL.DisplayAlerts = False
ObjXL.Columns("X:X").Select
ObjXL.Selection.NumberFormat = "@" ' set column to Text
730 ObjXL.Worksheets(intWorksheetNum).Cells(intRowPos, 1).CopyFromRecordset rsNutsAndBolts
The Comments column are limited to 255 characters. So, the CopyFromRecordset (recordsetvariable) creates the 255 character limitation.
The reason? The 255 character limit is because CopyFromRecordset sutomatically uses the Characters property of the Range object. The 255 limit would not be there if the Cell Value property is used to assign the string to that cell.
Dim sRx as String ' String Prescription
sRx = "String with > 255 characters ... you fill in the rest ...."
Cells(1, 1).Value = sRx ' Cell's Value property assignment can be very large
Solution 1:
The record set is still in memory. By using a loop, a cursor can start with record 1 (memo column) and assign that value to the Excel row / column using the .value as shown above. Basically, this moves one memo field at a time, record by record. e.g. Read First recordset in Access, copy to variable, assign value to Excel row/column Then move next on each Access and Excel.
Solution 2:
An Access Memo filed [RxNotes] can have up to 750 characters. Cut it apart into three new fields that end up out in the very right Excel columns AA, AB, AC.
Note1=Mid([RxNotes],1,250)
Note2=Mid([RxNotes],251,250)
Note3=Mid([RxNotes],501,250)
Then using Excel Object - Concat the cells back cell by cell...
X2=CONCATENATE(AA2,AB2,AC2))
Then delete the columns AA, AB, AC to hide the evidence..Neither solution is all that elequent. Read about this and by golly, it made a difference
ConcatComments = "'" & CommentString
Before using the CopyFromRecordset be sure to add a single quote in front of the large string.
Turns out the interface between Access and Excel look for this to prepare Excel immediately for the string to be a string, not something else. Some of my strings had weird print characters that kind of looked like Japenese characters. It seemed random, it always happened if the string was 255 or more characters (ramdonly, not always). The single quote doesn't show up in Excel, but got rid of all the noise.
View 5 Replies
View Related
Nov 29, 2013
I have a field 'Payment Types' with values (Cash, Cheque, Debit/Credit Card) and a field 'Payment Received' which is Yes/No.
When putting the order through the user selects the payment type and ticks a box if payment has been received.
On a report for delivery drivers, the owner wants it simple for the driver... he wants all the payment types listed with a checkbox next to each one, then wants the appropriate box ticked if payment has been received.
So I need something on the report (or underlying query) which ticks the appropriate box, i.e.
If payment received = true then payment type checkbox = true.
Or should I put the payments into a separate table with both fields so multiple payment types can be marked as paid?
View 6 Replies
View Related
Apr 19, 2015
How do I reference a subform DS field to open up a tabbed form on another subform.
Here's what I have.
field one on the Sub DS opens up tab one on another form, as does field two on DS open tab two on another form.
but..
how can I click on "any" field on the DS, run an IF statement, and it checks if that record on the Datasheet, contains information in regards to, IF field one OR field two contains any data, and opens the tabbed form respectively on the other form?
View 3 Replies
View Related
Apr 21, 2014
My table:
tblHeatTreatment
- HeatTreatmentID - PK
- HeatTreatmentDesc - Text
- HeatTreatmentDetails - Memo
My form has a listbox (lstHeatTreatments - Multi-Select disabled) that displays Heat Treatment descriptions and an unbound textbox (txtHTDetails) that I would like to have display the corresponding memo field when a description is selected from the listbox.
This is my code so far:
Code:
Private Sub lstHeatTreatments_AfterUpdate()
Dim myConnection As ADODB.Connection
Dim myRecordSet As New ADODB.Recordset
Dim mySQL As String
Dim selectedRequirementKey As Long
Set myConnection = CurrentProject.AccessConnection
Set myRecordSet.ActiveConnection = myConnection
[Code]....
When I run the code I get an error:
Quote:
Run-time error '-2147352567 (80020009)':
The Value you entered isn't valid for this field
When I debug, it highlights:
Code:
Me.txtHTDetails = myRecordSet.Fields
View 3 Replies
View Related
Dec 17, 2014
My form used to work and as I kept adding event scripts now when I click on the ID text field, it doesn't open the linked record, but a blank record with 'Filtered' showing on the bottom navigation. I guess a question I have is,
-is there an order on which the procedure scripts run
-do they all run everytime, or just the specific event script
===================================
Private Sub Company_Click()
DoCmd.OpenForm "frm Company", , , "[ID] = " & [ID]
DoCmd.Close acForm, "frmCompanyDirectory"
End Sub
===================================
I used to have code on a button on the "frmCompanyDirectory" that added a new record to "frm Company" and that's when the ID = ID stopped working.
View 2 Replies
View Related
Apr 28, 2014
We have a memo field that folks may add to on different days. Additionally, different users may add notes if the person who started to work on the transaction is out of the office. My manager would like to add a way to include the date and initials of the person that added a new memo automatically after they add a memo. Currently, we don't track user login so I'm assuming we would have to in order to get their initials.
View 3 Replies
View Related
Jan 7, 2013
We are running many MS Access databases in a mixed estate - mostly Windows XP terminals. The databases are split with the front end on the desk top and the back ends on a server running Windows Server 2003. We have a chronic problem of crashes when users go back into memo fields to add data - all text. The problem is intermittent, not possible to reproduce and varies in frequency.
View 2 Replies
View Related
Jul 24, 2015
We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.
Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)
View 2 Replies
View Related
Jan 25, 2006
I have a database housing insurance policies, agents and groups(schools that have the policies). Currently, we call groups and put a "note" on a policy. This is a very basic database. I created a field called "notes". The callenge I have with this field is that only one note can be contained. Therefore, if we call several times the dates and note information all go to the same field. Any suggestions on setting up some type of table that would allow multiple note fields? how would I link the table to the main information table?or another approach? Any suggestions would be helpful.......
View 1 Replies
View Related
Jan 25, 2006
I have a database housing insurance policies, agents and groups(schools that have the policies). Currently, we call groups and put a "note" on a policy. This is a very basic database. I created a field called "notes". The callenge I have with this field is that only one note can be contained. Therefore, if we call several times the dates and note information all go to the same field. Any suggestions on setting up some type of table that would allow multiple note fields? how would I link the table to the main information table?or another approach? Any suggestions would be helpful.......
View 1 Replies
View Related
Jan 25, 2006
I have a database housing insurance policies, agents and groups(schools that have the policies). Currently, we call groups and put a "note" on a policy. This is a very basic database. I created a field called "notes". The callenge I have with this field is that only one note can be contained. Therefore, if we call several times the dates and note information all go to the same field. Any suggestions on setting up some type of table that would allow multiple note fields? how would I link the table to the main information table?or another approach? Any suggestions would be helpful.......
View 4 Replies
View Related
Sep 16, 2014
the user opens a certain mail and THIS mail should be either saved as PDF (for example by CutePDF - as it works with a word-doc) to disk or be imported to my Access datebase in a certain field (the Body of the mail).
But I could not find code to catch just the OPENED Mail, there are a lot of examples how to loop through a Folder or a view reading all mails in it, but no one for just the ONE.
There should be something like "uidoc", but I cannot manage it.
So in real, my problem will be to "detect" the opened (or at least the marked) mail in the Notes GUI. In Outlook I do this with ActiveInspector.CurrentItem, but in Notes?
View 1 Replies
View Related
Jan 15, 2015
I am looking to see if i could possibly get code that would allow me to send a calendar invite from Access to Lotus Notes?
View 2 Replies
View Related
Aug 6, 2013
I use the following 3 calls to add 3 fields to an Access db,
Code:
Call subCreateField("tblRootCanalTreatment", "lngMethodID", "dbLong", strPath, 606)
Call subCreateField("tblRootCanalTreatment", "txtReferencePoint", "dbText", strPath, 620)
Call subCreateField("tblRootCanalTreatment", "txtSpaceForPole", "dbText", strPath, 644)
The sub is indicated below,
Code:
Private Sub subCreateField(strTable As String, strField As String, strFieldType As String, strPath As String, lngVersion As Long)
Dim rstSerial As ADODB.Recordset
Set rstSerial = New ADODB.Recordset
rstSerial.Open "tblSerial", CurrentProject.connection, adOpenKeyset, adLockPessimistic
rstSerial.MoveFirst
If rstSerial!lngVersion < lngVersion Then
[code]....
Only the first field ("lngMethodID") gets created. The other two fields ("txtReferencePoint") and ("txtSpaceForPole") do not get created. If I exit the db before each sub call then all fields get added. Do I need to add some "refresh field" action or other action.
View 14 Replies
View Related