Change on Data type and code...

G

Guest

Hello,

In a blunder the size of Niagara falls, I had to change my ClientID type
from Number to text (for integration with Oracle purposes, I was told to...)

In any case, my forms and subforms are still connected (Yahoo!) but there
was a certain piece of code that I was given to map to specific reports that
are no longer working for those reports linked by ClientID (now text).
Here it is:

Dim strWhere As String

If Me.Dirty Then
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "There is no report to view."

Else
strWhere = " [VisitID] = " & Me.[VisitID]
DoCmd.OpenReport "rptMedEvalHeader", acViewPreview, , strWhere

How would I change this for the text data type?

Thanks,

Leonard.
 
G

Guest

hi,
make sure that everything from the table down is changed
to text.
form text box, query field, report field.
 
D

DebbieG

strWhere = " [VisitID] = ' " & Me.[VisitID] & " ' "

You have my sympathies!


| Hello,
|
| In a blunder the size of Niagara falls, I had to change my ClientID type
| from Number to text (for integration with Oracle purposes, I was told
to...)
|
| In any case, my forms and subforms are still connected (Yahoo!) but there
| was a certain piece of code that I was given to map to specific reports
that
| are no longer working for those reports linked by ClientID (now text).
| Here it is:
|
| Dim strWhere As String
|
| If Me.Dirty Then
| Me.Dirty = False
| End If
|
| If Me.NewRecord Then 'Check there is a record to print
| MsgBox "There is no report to view."
|
| Else
| strWhere = " [VisitID] = " & Me.[VisitID]
| DoCmd.OpenReport "rptMedEvalHeader", acViewPreview, , strWhere
|
| How would I change this for the text data type?
|
| Thanks,
|
| Leonard.
 
G

Guest

Hey DebbieG,

Thank you so much...I never knew my life could be at the mercy of an
apostrophe mark.

Have a great week!

Frodo.
 

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