jleval
Registered User.
- Local time
- Today, 10:14
- Joined
- May 16, 2012
- Messages
- 53
I have a form that has a command button that allows for adding notes to the form. The notes table is seperate from all other tables. It is not linked to any other forms. My boss will not allow it.
So, I have a couple of things going that allow the record I am viewing to know if there is a note attached to it.
The on current event holds this
Which works just fine. This tells me there is a note attached to the record. It pops up a command button that allows me to vies the note.
the command button use to work. Once I clicked it this code would execute:
Out of nowhere this stopped working and not only that, the combo boxes that used to be able to lookup any note dont work either. Does anyone have any idea what is going on here. I didn't make any real changes except with the on open even which goes like this:
This is used to populate the form when the new note button is pressed. Not the view note button, which is the one that applies the where condition. This should not even affect the filter.
I also tried changing the filter on load, etc in the properties. Noting helped
:banghead:
So, I have a couple of things going that allow the record I am viewing to know if there is a note attached to it.
The on current event holds this
Code:
If Not Me.NewRecord Then
If DCount("NoteID", "Notes", "[PartNumber]=" & Chr(34) & Me.PartNumber & Chr(34)) > 0 Then
Me.CmdComment.Visible = True
Me.lblNotes.Visible = True
Else
Me.CmdComment.Visible = False
Me.lblNotes.Visible = False
End If
End If
Which works just fine. This tells me there is a note attached to the record. It pops up a command button that allows me to vies the note.
the command button use to work. Once I clicked it this code would execute:
Code:
If IsNull(Me.cboTraceNumber) Then
DoCmd.OpenForm "frmNotes", , , "[PartNumber]=" & Chr(34) & Me.cboPartNumberTest & Chr(34)
Else
DoCmd.OpenForm "frmNotes", , , "[PartNumber]=" & Chr(34) & Me.cboPartNumberTest & Chr(34) & " AND [TraceNumber]=" & Chr(34) & Me.cboTraceNumber & Chr(34)
End If
Out of nowhere this stopped working and not only that, the combo boxes that used to be able to lookup any note dont work either. Does anyone have any idea what is going on here. I didn't make any real changes except with the on open even which goes like this:
Code:
If NewNote = True Then
Me.NoteTakerName.Locked = False
Me.txtNoteDate.Locked = False
Me.CustomerName.Locked = False
Me.txtNoteChangedDate.Locked = False
Me.ToolType.Locked = False
Me.PartNumber.Locked = False
Me.TraceNumber.Locked = False
Me.PurchaseOrderNumber.Locked = False
Me.InvoiceNumber.Locked = False
Me.txtComments.Locked = False
NewNote = False
If OpenNotesFromToolMeasurements = True Then
Me.ToolType = Forms![frmToolMeasurements]![ToolMeasurementCutterToolMeasurement Subform]!ToolType
Me.PartNumber = Forms![frmToolMeasurements]![ToolMeasurementCutterToolMeasurement Subform]!PartNumber
Me.TraceNumber = Forms![frmToolMeasurements]![ToolMeasurementCutterToolMeasurement Subform]!TraceNumber
Me.BatchID = Forms![frmToolMeasurements]![ToolMeasurementCutterToolMeasurement Subform]!BatchID
OpenNotesFromToolMeasurements = False
ElseIf OpenNotesFromBatch = True Then
Me.ToolType = Forms![frmBatch]![CutterToolMeasurement Subform]!ToolType
Me.PartNumber = Forms![frmBatch]![CutterToolMeasurement Subform]!PartNumber
Me.TraceNumber = Forms![frmBatch]![CutterToolMeasurement Subform]!TraceNumber
Me.BatchID = Forms![frmBatch]![CutterToolMeasurement Subform]!BatchID
Me.PurchaseOrderNumber = Forms![frmBatch]!PurchaseOrderNumber
Me.InvoiceNumber = Forms![frmBatch]!InvoiceNumber
OpenNotesFromBatch = False
End If
Else
End If
I also tried changing the filter on load, etc in the properties. Noting helped
:banghead: