selected record navigation

deepbreath

Registered User.
Local time
Today, 00:40
Joined
Apr 18, 2001
Messages
73
i have formA which displays all the data and i can move forward and backward by navigation buttons. can i build a formB which displays all the data and you can move forward and backwards like previous one, but this time navigation will depend on a paritcular value in one of text field, if that field is filled, it will display the whole record when u press next and if it is null then it simply skips to next record containing the value. confused, so am i . plz help
 
Confused??? Thats a bit of a understatement.
Please try to explain what you want a little clearer.

"Skips to next record containing the value" - What value??
 
i am keeping records of my patients,. all patients have a "hospital no" and some pateints have also a "mlc no". i just want to display only those patients details who have their "mlc no" entered to in a separate form. i hope this will explain my question. thanks
 
Ok,

The simplest way to do what you want, would be to use the mlcno as a criteria in the query that you base your second form on.

Field : mlcno
Table : Patients
Sort :
Show : Yes
Criteria : >0

Of course this only works if your mlcno is purely numeric, and not alphanumeric.

An other option, which involves more work on your part, would be to create a new field called MLCpatient for example. With a datetype of YES/NO.
That way you would use MLCpatient as a criteria, and only bring back records that have YES for mlcno.
This would bring up other issues that you would have to address.

If you have any other questions, just ask.
HTH
Angelo
 
but mlcno is a sort of alphanumeric. can u give bit more details, how to use this query in a form. example will be appreciated. thanks
 
Create a query that will display the data you want about your patients. In the 'mic no' column set the critera to: Not Is Null. Base Form B on this query. In form A put a command button one the form with code similar to this:

DoCmd.OpenForm "FormB",,,"[mic no] = '" & Me.[mic no] & "'"

The above assumes that you have a field called 'mic no' on both forms....
 
thanks works perfectly fine when one i run the formB directly but when i click command button on formA it gives error "can't find '¦' referred in your expression" any suggestions
 
Create the button that opens Form B using the Wizard. You will be given the opportunity to select Show All Records or A Specific Record. Select the Specific records and then follow the rest of the Wizards dialog boxes. That should do the trick...
 

Users who are viewing this thread

Back
Top Bottom