I need help!!!!!!! Pameter problem

L

Lincoln Beachy

I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)
 
L

Lincoln Beachy

Klatuu said:
The Dirty property is only valid for Bound fields

:

I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)
How should I do this what is the simple way. Should I have a text line
and type it in or what????
 
G

Guest

I am not sure exactly what you are trying to do. Are you wanting update the
current record before going to the record you are looking up? If so, how do
you update a record now. I would think that you would call whatever
procedure updates the record.

Lincoln Beachy said:
Klatuu said:
The Dirty property is only valid for Bound fields

:

I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)
How should I do this what is the simple way. Should I have a text line
and type it in or what????
 
L

Lincoln Beachy

Klatuu said:
I am not sure exactly what you are trying to do. Are you wanting update the
current record before going to the record you are looking up? If so, how do
you update a record now. I would think that you would call whatever
procedure updates the record.

:

Klatuu said:
The Dirty property is only valid for Bound fields

:



I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)

How should I do this what is the simple way. Should I have a text line
and type it in or what????
I want to print a report in the ranges in dates and a certain option.
For an example 1/1/05 and 5/30/05 and the gallons unit in the report.
The combo box is bound to a table "units" the table has one field only.
I hope this will help you.
 
G

Guest

You lost me, Lincoln. You say the table has only one field, but you want to
choose a range of dates and an option. How can you have 2 conditions on one
field?
What kind of data is the field? What is the option?

Lincoln Beachy said:
Klatuu said:
I am not sure exactly what you are trying to do. Are you wanting update the
current record before going to the record you are looking up? If so, how do
you update a record now. I would think that you would call whatever
procedure updates the record.

:

Klatuu wrote:

The Dirty property is only valid for Bound fields

:



I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)


How should I do this what is the simple way. Should I have a text line
and type it in or what????
I want to print a report in the ranges in dates and a certain option.
For an example 1/1/05 and 5/30/05 and the gallons unit in the report.
The combo box is bound to a table "units" the table has one field only.
I hope this will help you.
 
L

Lincoln Beachy

Klatuu said:
You lost me, Lincoln. You say the table has only one field, but you want to
choose a range of dates and an option. How can you have 2 conditions on one
field?
What kind of data is the field? What is the option?

:

Klatuu said:
I am not sure exactly what you are trying to do. Are you wanting update the
current record before going to the record you are looking up? If so, how do
you update a record now. I would think that you would call whatever
procedure updates the record.

:



Klatuu wrote:


The Dirty property is only valid for Bound fields

:




I need help badly...
I have a form with unbound fields and a combo box that is linked to a
table, that table is called units. When I selected an option in that
combo it brings up an Run time error '2455'
You entered an expression that has an invalid reference to the property
Dirty. I select debug. It will bring up the code.
Here is the code::::
Private Sub Units_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.Units) Then
'save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[units] = " & Me.Units
If rs.NoMatch Then
MsgBox "Not Found: Filtered?"
Else
'Display the found Record in the form
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub

Do not send me an email the one that is showing. If you are going to
send an email, sent it to (e-mail address removed)


How should I do this what is the simple way. Should I have a text line
and type it in or what????

I want to print a report in the ranges in dates and a certain option.
For an example 1/1/05 and 5/30/05 and the gallons unit in the report.
The combo box is bound to a table "units" the table has one field only.
I hope this will help you.
The form is unbound but the combo is bound field to a table that is
called units. That table has gallons, boxes, qrts, each, etc for
options. this is table is in an Purchase Order database. And I am trying
to make an report that is between two dates and show just the units
that I selected in the combo box. When I go into the debug mode(VBA)and
exit it the report shows that info. I am trying to bypass that debug
mode. In the code there is one line highlighted that is: If Me.Dirty
Then. What am I doing wrong. After that first time, it doesn't pop up
that message.
Lincoln
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top