The search by cell number is one of those difficulties I warned you would face with this structure. I expect will require VBA code.
What method did you use to filter by unit number?
The search by cell number is one of those difficulties I warned you would face with this structure. I expect will require VBA code.
What method did you use to filter by unit number?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I didn't write the code for this and do not remember where it originates from but here is an example of the MouseHook dll. It requires the DLL file to be in the same directory as the DB file.
To implement in your project, copy the Module, "modMouseHook", to your DB. Copy the DLL file, "MouseHook.dll", to the same folder as your DB. Call the function using VBA like in the example form.
Call MouseWheelOFF
The typical approach is to call the function using a splash form or your Main Menu form. Place VBA in the form's On Load event to call the function and disable the Mouse Wheel.
To get my search to work for unit number I created a query that displayed all of my information in all of my tables. Then, since each table contains the field Unit_Number I put the criteria for those 5 fields as [Enter Unit Number] and also set the parameters to [Enter Unit Number]. This then allowed me to type in a unit number and have all data associated with it appear. Next I created a report that used that query and displayed the information in a very similar manner to how my original form was set up so that someone could just click on the report -> type in the unit number -> hit print and have a one page print out of all of the information pertaining to the specified unit number.
Now in case someone doesn't know the unit number but only knows the cell number I was hoping to make a one step process like my other report to get the same outcome. I could do it in two steps by creating a search query that displays the unit number given a cell number and then have the user input that unit number into the first report, but it would just be nice if I could have it all in one piece.
Also -ItsMe- I really don't understand the second half of you're no mouse wheel post. I know I have to download the file -> put it in the same folder as my database -> how do I put code in my DB ? -> what's this about a splash and main menu and stuff?
Are you saying I need to essentially create and run a query that will disable my mouse wheel? Will it disable it only for MS Access or for the computer in general? Thanks for finding that for me though and I'll give it a try tomorrow morning when I get back into work.
Update-
Thank you very much June7 and ItsMe. This morning I was able to finish hiding the lines and records that I couldn't get rid of (I didn't know there were two different properties tabs, one in the design view and one in the main view). I was also able to get the scroll wheel to shut off using that program. I just added the file to the same folder as my DB and copy and pasted the module and the form into my DB and put the buttons right on my form to enable and disable the wheel. Works perfectly.
Two final tasks I have-
1. Figure out a way to search by cell number in one step
2. Back when I first started this DB ItsMe was helping me with a a query to update tables. I could only get it to work as an update query and I have to manually run the query each time I want it to update. What it does is take the value entered for Unit Number on my form and copy it into the Unit Number field for all 5 tables. Is there a way to make this happen say everytime I hit save it updates? Thanks again for the help I couldn't have come close to what I have without your assistance.
I attached my latest changes below in case anyone was curious.
EDIT I figured out a way to create the update query as a command button and put it right on my form. Is it possible to have 1 button perform two tasks?
Last edited by tc197; 07-01-2014 at 11:01 AM.
I think I understand what you mean by me having normalization issues finally. I'm trying to create this search query and I'm realizing that since I have 48 cells and 48 columns I can't just search by cell number because each column has nothing in common. I would either have to know which column the cell is in and then search the number or some how create something that will search column by column until it discovers the cell number? Is this where that VBA code comes in that you mentioned? Is there any other way around this so I don't have to change my tables?
http://www.mssqltips.com/sqlserverti...-server-table/
Is something I can use? If so how would I use it?
EDIT
found this https://www.accessforums.net/queries...ble-21591.html
going to try it.
EDIT2
The above thread worked great, I can search by cell number now but not in one step but its fine for the time being. Still trying to find a way to have 1 field populate a field in 5 other tables automatically... any ideas?
The VBA I alluded to would take the inputs on a form and build filter criteria to set form Filter property. Review http://www.allenbrowne.com/ser-62code.html
The first link you reference is not relevant to Access unless you have a split db and the backend is SQL.
Populating other tables would require code to execute INSERT sql action. 5 tables means 5 actions. I use only VBA.
CurrentDb.Execute "INSERT INTO tablename (fieldname) VALUES('somevalue');
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June FYI, similar (not exactly the same) problem question here
https://www.accessforums.net/access/...red-45024.html
June FYI, similar (not exactly the same) problem question here
https://www.accessforums.net/access/...red-45024.html
Sorry I thought that it was a completely different question and since almost everything was solved that I asked here I figured I'd start that problem in a new thread.
I was not reporting you to a Moderator. In the interest of saving time and energy, I was bringing your issue to the attention of June. There are some common denominators that may effect what advice is given.