Access clearing please help

chelsearenee26

New member
Local time
Today, 00:02
Joined
Sep 2, 2013
Messages
6
I am making a database based on music, I am making a search song form I have the query made and put onto the form. I can search the songs once but when I go back to the search page the previous search history is still there and when I type something new in the previous history is still there. I have tried to make a clear button or refresh but it doesn't work. Does anyone know how I can fix this? I need to know ASAP! Please and thank you!
 
Hello chelsearnee26, Welcome to AWF.. :)

What is the code behind your Search button? What is the code you have 'tried' to clear the form controls?
 
Currently the search button just links to the query on the form, and I have tried on the text boxes of the year, song name and genre (titles available to search) the year.value = null among many others that include the null code but none seem to refresh nor clear the data. I am considerably new to this area of access so I'm sorry if I don't give a better explanation.
 
So is your code something like..
Code:
Private Sub searchBtn_Click()
    DoCmd.OpenQuery "searchForTheSong"
    Me.yearTextBox = Null
    Me.songTitleTextBox = Null
    Me.songNameTextBox = Null
End Sub
 
Without seeing what you are actually doing it is hard to give a correct answer, so is it possible if I could see that?
What is the code behind your Search button? What is the code you have 'tried' to clear the form controls?
 
Do you think it would be possible if I could send my database to you because there is currently no code because I have absolutely no idea how to fix this?
 
What do you mean there is no code? Well I would be happy to take a look..

How to Upload a Stripped DB.

To create a Sample DB (to be uploaded for other users to examine); please follow the steps..

1. Create a backup of the file, before you proceed..
2. Delete all Forms/Queries/Reports that are not in Question (except the ones that are inter-related)
3. Delete auxiliary tables (that are hanging loose with no relationships).
4. If your table has 100,000 records, delete 99,990 records.
5. Replace the sensitive information like Telephone numbers/email with simple UPDATE queries.
6. Perform a 'Compact & Repair' it would have brought the Size down to measly KBs..
7. (If your Post count is less than 10 ZIP the file and) Upload it..

Finally, please include instructions of which Form/Query/Code we need to look at. The preferred Access version would be A2003-A2007 (.mdb files)
 
On the form you are using to do the search.... are the boxes you are typing the search terms into bound, or unbound controls?

If they are bound, then that could be why it keeps 'bringing them back' - it's opening the form and showing what's in the fields already.

If you don't want it to store the values, remove the data source from the controls... then it CAN'T store anything!

(sorry, not explained that very well, but I hope you can see what I'm saying!)
 
I am so sorry this has taken so long, it isn't allowing me to post it to you. I have removed as much information as I think I can and compacted and repaired it but it still says it's too big!
Do you possibly have an e-mail address I could send it through?
 
Have you followed ALL the instructions I provided in Post#8? The max size is 2MB.

PS:
I do not mind sending you my email, but unfortunately your account on AWF is set up that I cannot send you a Private Message.
1. You can Edit that under User CP, or
2. Send me your email in a PM, or
3. Share it on DropBox.

I prefer Option 3, that will atleast help other people to look into the issue as well.
 
I have just shared it on dropbox. What name/email would you like me to put so I can send it to you?
 
Just paste the Link on here, you do not need an email.

BTW, CazB made an excellent suggestion, did you look into that?
 

Users who are viewing this thread

Back
Top Bottom