search form giving error with code

bkalimili

Registered User.
Local time
Today, 09:56
Joined
Aug 23, 2004
Messages
23
Hi,

I have a database with a main form(frmmain) and subform(acctdetails subform). I am trying to create a search form(frmsearch) to search the GL id and Journal date.

So when a Gl id is entered, it should give all the matches and its subform records.

I have some code in the subform and created a separate module 1 calling the function in the search form when the user clicks OK.

Right now I am trying when user enters Gl Journal ID.

I am getting the mismatch error in the code when running.

Thanks, I am trying to work on this from morning, no luck. I have dead line.

Thanks
I am attaching the database
 

Attachments

Quite often a type mismatch will be a . intead of a ! or vise versa
 
You seem to be waaaay over-complicating things. Try the attachment for a simple way to search.

Dave
 

Attachments

My search includes entires for both main and subform,Can any one look into this.

Hi,

Thanks for your example. In your example you are just dealing with one table, where as in the database that I have attached, I am trying to search by Gl ID and get its associated subform records too.

Am I doing correct to get the above task done.

There might be many records with same GL ID.
Can any one help with this.

Thanks.
Satya
 
Try this Example. It will search the records in a subform, find the record on the main form and the go to the record on the subform.

Dave
 

Attachments

My suggestion would be to use the first example and have 2 list boxes with 2 search boxes.

I will have another look, but your attached Db brings up errors when I try to open it.

Dave
 

Users who are viewing this thread

Back
Top Bottom