Notes Box...

.Justin

Registered User.
Local time
Today, 13:27
Joined
Jun 29, 2009
Messages
38
I can't think of the type of box to save my life so I have a screen shot of one. What I would like to know is how to make one the simpler the better!



So you type in the details you want then click add so it saves it into a box on that form and you can repeat it? If that makes sense?
 
Noooo You type it in the box below the memo click add entry and it cuts it intot he memo feild?
 
What version of Access are you running? Unless it's 2007 and this is something new that's been added with this version, this will require custom coding; it's not something native to Access thru v2003.
 
I admit I have not jumped into my 2007 as much as I need to.....BUT, I don't think that is something in 07 either.... Looks like some custom coding needed to me too.... And keep in mind some sort of "Date/Time" stamp on each entry... I'm guessing this might be needed.
 
Here's a hack I wrote for someone a while back that does just this. In a medical environment you might want a Date/Time stamp or you might need to input your own by hand.I give an example with and an example without a Date/Time Stamp:

In this hack a second, unbound textbox (TempDataBox) is used to enter the data into. This textbox is originally hidden, and when the command button (IndirectDataInput) is clicked, it appears. Data is entered, and when the command button (now captioned “Commit Data”) is clicked again, the entered data is added to the memo field.

Now, in this example, there are two memo fields, but only one is bound, since the other memo field is simply a temporary holding area. The memo field is also locked so that all data entry has to be done thru the temporary textbox.

TempDataBox is unbound, and in the Property Box its Visible Property is set originally set to No. I place mine side by side with CommentsField so the user can refer to what's currently in the CommentsField section while entering new notes.

CommentsField is bound to the underlying table/query, and its Locked Property is set to Yes.

Place a command button on the form. Name it IndirectDataInput and in the Properties Box set its Caption to “Add New Data.”

Now use this code:

‘IndirectEntry Without TimeStamp
Code:
Private Sub IndirectDataInput_Click()
If IndirectDataInput.Caption = "Add New Data" Then
   TempDataBox.Visible = True
   TempDataBox.SetFocus
   IndirectDataInput.Caption = "Commit Data"
Else
   IndirectDataInput.Caption = "Add New Data"
   If IsNull(Me.CommentsField) Then
      If Len(Me.TempDataBox) > 0 Then
        Me.CommentsField = Me.TempDataBox
        Me.TempDataBox = ""
        TempDataBox.Visible = False
      Else
        TempDataBox.Visible = False
      End If
    Else
      If Len(Me.TempDataBox) > 0 Then
       Me.CommentsField = Me.CommentsField & vbNewLine & Me.TempDataBox
       Me.TempDataBox = ""
       TempDataBox.Visible = False
      Else
       TempDataBox.Visible = False
      End If
      
    End If
End If
End Sub
‘IndirectDataEntry With TimeStamp
Code:
Private Sub IndirectDataInput_Click()
If IndirectDataInput.Caption = "Add New Data" Then
   TempDataBox.Visible = True
   TempDataBox.SetFocus
   IndirectDataInput.Caption = "Commit Data"
Else
   IndirectDataInput.Caption = "Add New Data"
   If IsNull(Me.CommentsField) Then
      If Len(Me.TempDataBox) > 0 Then
        Me.CommentsField = Now() & "  " & Me.TempDataBox
        Me.TempDataBox = ""
        TempDataBox.Visible = False
      Else
        TempDataBox.Visible = False
      End If
    Else
      If Len(Me.TempDataBox) > 0 Then
       Me.CommentsField = Me.CommentsField & vbNewLine & Now() & "  " & Me.TempDataBox
       Me.TempDataBox = ""
       TempDataBox.Visible = False
      Else
       TempDataBox.Visible = False
      End If
      
    End If
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom