General discussion

Locked

Comparing 2 strings from 2 files -match

By rpar855305 ·
using udt's and MDI forms how do you compare
to lines from two different files

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Comparing 2 strings from 2 files -match

by Glen_McLeod In reply to Comparing 2 strings from ...

The question seems a little vague, but once you hve read the data into your UDT's, you can use the standate string comparison operators for your language. In VB you can use the 'equals' sign or the function StrComp.

If myUdtFromFile1.strInfo = myUdtFromFile2.strInfo then ...

If this doesn't help, post some more specific information, and I'll figure it out for you.

Glen

Collapse -

Comparing 2 strings from 2 files -match

by Glen_McLeod In reply to Comparing 2 strings from ...

I need a spell checker! 'standate' should be 'standard'!

Collapse -

Comparing 2 strings from 2 files -match

by rpar855305 In reply to Comparing 2 strings from ...

Patrons have reserved seats at a PlayHouse
If a performance date is clicked:
IF the id number for reservation selected
equals performance id number
then my label array of seats should color
the label red
This is what I have
Reservations - one file
Performances - another file
g_ID equals performance id

For intIndex = 0 To 47 'There are 48 seats
ReDim Preserve udt_Reservations(intIndex)

If (RTrim(udt_Reservations(intIndex).id))=
g_ID Then

lblSeats(RTrim(udt Reservations(intIndex).
seat).BackColor = vbRed
End If
Next intIndex
'Only seats previously reserved should be
red for that particular performance

Collapse -

Comparing 2 strings from 2 files -match

by rpar855305 In reply to Comparing 2 strings from ...

Patrons have reserved seats at a PlayHouse
If a performance date is clicked:
IF the id number for reservation selected
equals performance id number
then my label array of seats should color
the label red
This is what I have and it doesn't work
Reservations - one file
Performances - another file
g_ID equals performance id

For intIndex = 0 To 47 'There are 48 seats
ReDim Preserve udt_Reservations(intIndex)

If (RTrim(udt_Reservations(intIndex).id))=
g_ID Then

lblSeats(RTrim(udt Reservations(intIndex).
seat).BackColor = vbRed
End If
Next intIndex
'Only seats previously reserved should be
red for that particular performance

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums