want my form to be blank when just loaded

popeye

Work smarter, not harder.
Local time
Today, 12:00
Joined
Aug 23, 2004
Messages
75
i was having a prob with a search box but i downloaded an example from ythis site which uses a textbox and a list box.

MNy problem now is that when the search is done and i click in the box for the record, the data on my form doesnt change

the form opens every time with the same record and when i use the search and double click the record in the listbox(which is working) the record on the form doesnt change.

what can i do???
 
yes mo. it is

Im sorry to be asking for so much help

I modified it and placed an unbound txtbox which acts as the search box.

there is also a unbound listbox on it


the list box shows Id number Surname and Christian name for all records in the table

when i type either Id# surname or christian name, the listbox filters to the specific record so i know that the listbox is functioning


but when i double click in the list box so that the record changes it doesnt.

this search thing is really getting to me.

i wanted to just do a separate form to search but then i thought it might be more effiecient to have a listbox and then double clicking and getting the records up.


Im really lost now.

i downloaded a sample database from the sample database section of this forum called search02.zip

and i followed the principles behind the functionality of that form so mine should be working accordingly.

i dont know what to do.

can i send you another zip with the modifications ive made so far, maybe you could point it out to me.
 
hmmm,,, try this

1. create a combo box on you form with the details you have just mientioned.
Id Number
Surname
Christian Name

2. the on the afterupdate event of the combox box place thefollowing code

Me.Requery
If Len(Me!ComboxboxName.Column(0)) = 0 Then
DoCmd.ShowAllRecords
Else
DoCmd.ApplyFilter , "ID Number = Forms!YourFormName!Comboxname"
Me.anyfieldname.SetFocus
End If

i believe your ID Number is the Primary Key. so this should work .
select any id number from the combo box and enter it will display the record in the field.
 
hey mohammad. thanks for all your help but i'll call upon your skills with another prob.

It turns out that the avg currency value that was being calculated on the currency1=currency2 and currency2=currency3 criteria was what was giving the trouble.

I only had 2 records in the db and only one of them had satisfied the currency criteria wich is y the db form wouldnt display the other record even when it was brought up in the list box.


I hope to become as competent as allyou other "SENIOR" programmers

THANKS A LOT :)
 
pleasure is all mine. you have my email. just send anything ifyou need me.
 

Users who are viewing this thread

Back
Top Bottom