I want to create a dropdown list where it is list the data from database and when I press on of them, it give detail of the item. How should I do it? Here is some explanation on how I want to do it. In a dropdown list I have users from the database and when I click one of the user, it tell's me the detail of the user using ajax.
It is up to you and your case.
One option is getting the data with all the details (it will slow the initial loading depending on how big your records are).
You can, on the other hand, get simplified data and get the data by id for details on every click.
Which one is right? Totally depends.
Related
I'm working an Access Database for my church's local cemetery. They wanted something free, and low-to-no-maintenance, and I didn't want to go with anything online.
So I've made a sample Access Database with the fields and a simple query, checking if the field is filled out, and searching for the field if it contains something. My only problem is that, since these people want something user-friendly and easy, I can't have them right-click, close, then double click on the query every time they update the search form and click the button. What's the best way to fix this?
Again, I want to not have to quit out of and re-open the query every time I update the search form
Example Search (using random names): Every first name contains "o": https://i.imgur.com/2t5B9lK.png
Example output: https://i.imgur.com/JqZ8f7v.png
Do the search in the form header and show the results in the form details.
I have a List Box in my form.
I'm allowing the user to edit the contents which is a feature I'd like to have and the default feature works great for my needs. I know if you right click the list you get the Edit List Items Window too.
But my issue is most of my users are not Access savvy, so they may not know to right click to open the window. I'd like to make it so the blue edit button will open that window with VBA, but I can't figure out how to call opening that window with VBA.
Is this even possible, if so I'd love to know the call.
You can simulate the click on edit
Private Sub btnValueListEdit_Click()
Me.myListBox.SetFocus
DoCmd.RunCommand acCmdEditListItems
End Sub
But this is not recomended!
Have a look at Add items to a Value List from Allen Browne.
You can remove items that are actually being used in other records.
You can correct a misspelled item, but the records that already have the misspelled item are not corrected.
You can add items to your form, but in a split database, other users don't get these items. Consequently, other users add items with other names to their forms, even where they should be the same item.
If you answer No after using one of the new items, you now have items in the data that don't match the list.
If you answer Yes in an unsplit database, you introduce strange errors as multiple users attempt to modify objects that could be in use by other people.
If you answer Yes in an split database, the list of items in one front end no longer matches the lists in the others.
Your changes don't last anyway: they are lost when the front end is updated.
Conclusion
Use tables, not value lists, to manage lookup data. Create relationships with Relational Integrity.
Use these lookup tables (or queries based on them), as the RowSource for your combos. Do not use Value Lists for anything more than the simplest of choices that the user never needs to edit.
Use the Not In List event to add data to simple, single-field lookups such as types or categories.
If you only use Access 2007 or later, the List Items Edit Form property is a quick and easy way to nominate the form to use for managing the list items.
To edit the list in any version of Access, or to control how the editing works, use another event such as the combo's DblClick.
I am sincerely sorry if this question has been asked before, however with my limited knowledge of using Microsoft Access forms I am having an issue that is likely a very simple fix.
At the moment I am trying to create a form that will allow me to post data into an intersection table using combo boxes, the purpose is to create a relation between Clients and Project Numbers, these are intended on being a Many-to-Many relationship.
Relation Example
To begin with one issue I am running into is that when I use the intersection table to select a unique Client Name I get multiple entries from the drop down menu when there are multiple items in the intersecting table.
Form Example
The second part of my issue is that I am unsure how to post data to the intersecting table once the dropdown selections have been made.
Any help is greatly appreciated, and I thank everyone for their time.
The first part is to create a form in which you find, and edit data in the main client table.
This form will ONLY be based on the single main client table.
You perhaps ALREADY have a nice form to edit the client table anyway. I mean, how else will users find and edit a client anyway? So this issue and problem will LONG be dealt with before you do anything else of use in the application.
The form based on this single table might look like this:
Ok, now close the above, and create a second form to allow adding some choices of favorite colors (or in your case ClientContract). So the form will be based on this child table.
Again, like the first form, this form is based on ONE table.
Make this form continues, so click on ClientContract table, and then from ribbon choose multiple items form from the ribbon. It will look like this:
Of course we don’t want the user to have to manually type in the color (or project in your case), so we drop in a combo box from the ribbon and use the wizard. MAKE sure the first column of this combo is the PK of the ProjectNumber table, but FOR EASE of reading and selection, include ProjectNumber and Project Description columns in that comb box. NOTE in above how I also had added that combo box.
Assuming you closed and saved this form.
Now open our first main client form in design mode, and drag + drop in the continues second form we just created onto this form. The resulting form will look like this:
Access will automatic set up he customer_ID for us (because it is a sub form attached to the main form that only displays the one main record).
Once the above works, then again close the lot, and open up our continues form in design mode and remove all the extra junk.
(leaving ONLY the combo box).
The result is this:
Ive got a peoples DB and after some development my recordset for the main form is not updatable because of subqueries etc etc..
All this is because i redesigned the DB to resemble real life more, meaning i added some tables that could track certain things. This made the relations a little more complex and now im left with a DB i cant add new records to or edit hahaha and thats pretty useless
So I'm left thinking it can't only be me so there is either a simple solution i can't see or i have designed my forms totally wrong.
Whats the praxis in design/structure when you have/get a form based on a recordset that's not updatable in a "regular" peoples DB and you want to add or edit details in it? (think HR managment DB)
(Reason for the recordset being un-updatable: The recordset is based on a query that gets records from 3 related tables and does a MAX function on a date field to get the most recent record on two of the tables)
Now i have a mainform and three subforms on it. I can edit/add info in the subforms of course but the mainForm displaying names and other personal details is not updatable...
The mainForms Query is querying the tblPerson, tblInmate, tblClassificationHistory and tblSquadHistory...
In your case, I would recommend two possibilities:
Build an extra form for input and edit data for persons where the only record source is tblPerson. This input/edit-form you can open in your main form via button or ribbon for example. You can build one form for input and edit data and change the behaviour by VBA-Code (or even Macros?). Or you can build two forms for edit and input data seperately. Also you can add OK and cancel buttons to safe or undo your changes. The possibilities are endless. This is basis ACCESS knowledge and there are tons of tutorials out there, so I will not explain this further.
Change the query on the main form. If you have a continuous form and you do not want to add a new form, you should edit your query. I can not estimate your described query complexity with given information, but there must be a way to get the "MAX-date"-recordsset without aggregated ("Group By" -Statement) query results. Your goal is to change your main-form query, that it does not have any "Group by" part. Be aware that you can use subquerys to do the "Group by" for finding the "Max-Value". You should also check your main form query, if you really need all queried fields for the main form. Let your three subforms do the data query work.
Basically, the perfect user interface (UI) as forms in ACCESS depends on the users preferences, expectations and the use case itself. So you have to find out, which design suits best for your application. You can do some research on UI design patterns if you want get knowledge from recent experiences. It is a huge field of expertise!
What is the best way to organize a big database.
The way it works is that only I am allowed to touch or modify the database but interns help sometimes to collect data, we used to have the whole system excel based, back than we had the macro which by choosing 2 files it will integrate and mark in colors the changes.
How can I create something friendly to use which will update by pressing a button and also will show changes!! I am familiar with the update query, however:
it doesn’t track any changes.
I want to know other options.
To sum up the way of processing is:
I have the database and I need to split some data to smaller files so other employees will work on.
Then I will collect the files and integrate with the existing database, but since we are all human mistakes can happened that’s why I want to be able to track easily changes.
The updates are going to happen often. When I will give the intern a temp. table The possible changes are for example: address, phone number, price, they will do those researches based on current data which they will find online which information has been changed, and they will change the info which is on the temp. table, That is why I want to be able to know what exactly did they found out. Lets say if Product A (product ID1234) used to cost 10$ and today its 12$ from the same supplier. I just want to know and to see that the price for product ID1234 has been changed. Not only to have it updated to the back end database. For quality assurance I need to track which new input they did in relation to the product ID. (some times input by someone else which was done in wrong format or wrong column could affect big time on the quality of the reports)
So this was the explanation for what I need the reports
So in order to make those temp. tables, I want to create a form for it that by choosing region, category etc. and then clicking on a button it will automatically select the relevant records from the database, create a new table/access-file and then copy the selected records to the temp. table. So someone else could work on it...
Next thing is that it would be nice to know how can I create a template for tables, by template I mean to standardize by validation rules. some fields I'd like to have dropbox menu, some fields ready mask for phone number.... etc.
Final part, after they made the changes and saved the file (the temp. table which they were working on), I want to be able to update the back-end database via clicking on a button...
Looking forward to get the best solution!
Thanks in advance J
Michael
Okay for the temp tables thing:
why not split your database in a backend part (having all the tables) and a frontend part which contain the forms and tables the interns need? I'm guessing mostly it is going to be the same so you can even create multiple different frontend's to give to different interns incase they need other tables. There are a lot of articles out there about splitting a database and linking tables.
Then the thing about the record changes not sure is this is what your looking for but it could help, i haven't used it myself so not sure what it exacly does. But this may help you a bit.
http://support.microsoft.com/kb/197592
I would consider taking a look at the BeforeUpdate event for the form. You can trap the old and new values of textboxes if the form is bound to a table. You could loop through all the controls on your form and check for Me.Control <> Me.Control.OldValue. If they don't match, write both values to an auditing table so you can go back and check whenever you want to. I would include the following fields in your auditing table:
ChangeDate
TableName
ControlName
OldValue
NewValue
Then you can query that table any time you want to see what has changed.