View Full Version : Finding a Specific Record


farooksg
01-18-2001, 06:45 PM
HI

I have a set of datas related to Pipes. I want to view the datas related to a specific pipe. This can be done by getting 3 input values from the user (that is ) Pipe Length,Pipe Type,Pipe Size. for Example

Input 1. (Pipe Lenght)
if you give Pipe Lenght as 1" we will have 10 types of Pipes for 1".

Input 2. (Pipe Type)
if you give the type as "AAA" then you get 2 types of pipes having 1"length
& type "AAA" .

Input 3. (Pipe Size)
On giving the pipe size lets say 2.1 , we will get the exact pipe
information therefore 1"length,AAA-pipe type, 2.1 pipe size.

On getting the 3rd input only we will be able to find out the exact pipe
details. All the 3 inputs are combo boxes. I tried using the recordsetclone
property in the after update event of the 3rd input but I get an error as type
mismatch , I'm not able to correct the error. The following are the codes that I
used in the after update event of the 3rd input.

Private sub PipeSize_afterupdate()

Me.RecordsetClone.FindFirst ("[length] = '" & Me.length & "'" And "[type] = '" &
Me.Type & "'" And "[size] = '" & Me.Size & "'")
Me.Bookmark = Me.RecordsetClone.Bookmark

end sub

All I want is after getting the 3rd input form the user I must display the pipe
details. This record should not be saved in the table , this is just a read only
type.

Can anybody help me to sort out the problem.

Thanks in Advance

Regards

Farook

simongallop
01-19-2001, 09:07 AM
You seem to be carried away with ' and "

Remove them from around the AND as that is part of the string. ie

MyString = "[Field1] = " & Pipesize & " AND [Field2] = " & ...etc. You are right though in using ' for strings. Numeric values do not need them.

Sorry if not clear...end of week!!