Need help - Refresh list boxes and using multiple text boxes in search form

thaonguyen

Registered User.
Local time
Today, 15:54
Joined
Sep 20, 2013
Messages
23
Hi all,

I built a database to store and help searching for lessons/books based on certain criteria. I have two questions relating to my database that I hope everyone can help me out

1. In the data entry form, I have some textboxes, combo boxes and listboxes. I also have 2 command buttons, one is to save records (Command Save in macro) and one is to refresh record (command New). To tell the truth, I got the sample from Microsoft and changed it. So when I want to add a new record, I click the New button but only the text boxes and combo boxes are refreshed and go blank. The text boxes still have the previous records chosen. I want them to refresh as well. So I did some research and I tried using the Null VB but it didnt work. Below is how I wrote the code:

Private Sub cmdNewRecord_Click()
Me.Combo163 = Null
Me.Location = "" (This is a text box)
Me.Page = ""
Me.[Work title] = ""
Me.List128 = Null
Me.List130 = Null
Me.Vocabulary = ""
Me.Activities = ""
End Sub

2. In the search form, I have a search text box that can search either one of the five fields and a few combo/ list boxes (Thanks to John Big Booty's dynamic search). It works great. However, I want to add a second text box to search more fields at the same time. So ideally, the first text box searches either Title or Work title. and the second text box searches either Vocab, Language points or activities. This is where it stumped me. I tried to write the SQL but I wasn't sure about the OR and AND criteria. So I hope anyone can point me to the right direction. I couldn't attach the whole database because it's much bigger than 2MB. I attached the pic of the search tool to give you a better idea of what I meant.

Thank you!
 

Attachments

  • database.jpg
    database.jpg
    101.4 KB · Views: 128

Users who are viewing this thread

Back
Top Bottom