Create A Randomise List From A Table And Save The List For Each Month
Dec 14, 2006
Hi All a newbie here so any help will be appreciated,
sorry for the long post but trying to give you all the information you might need.
I wrote a basic access database for my Church to aid in a paperwork audit for a charity food drop which we do monthly to give free food to the needy.
But each month it gets harder to find out who was in line first so I thought with all your help we may be able to randomize the names each month in a different order as to avoid confusion and also avoid people waiting in line as they turn up at 5am and we don't start until 9am.
So if this will work in access they can all come for 9am
I don't mind creating a new database and adding the additional information, if that's what it would take.
My Background I have created basic databases from scratch not using wizards, But I don't know much about code or how to implement it so any help in where code goes it would be very much appreciated.
Database details (Microsoft Access 2002 version)
Table Name = details
Field name = ID (auto-generated)
Field name = FirstName (text)
Field name = Surname (text)
If possible it would be nice to keep a record of the randomized lists (in the database somewhere ?) each month in case anyone wants to see it or disputes the lists, where I can just create a report to show the details.
There will be approximately 90 to 125 names.
Thank you in advance for all your help in this matter
Britgent
View Replies
ADVERTISEMENT
Aug 19, 2013
I have a list of customers with multiple rent start and end dates. I need to create a query where each customer will have a record for every month/year between their respective rent start and end dates. I generally use macros but can't figure out a way to do it without VBA. My field names are Rent StDt and Rent EndDt. My query name is QCalcREndDt. I use version 2010.
View 6 Replies
View Related
Jul 11, 2014
Save Item in listbox (Row source type : Value list) to a table in a database .
View 3 Replies
View Related
Mar 31, 2015
What is the correct way to save the values in a listbox column to the fields of a table? I can use rec("field1") = Me.list16.ItemData(Varitem)and that records the bound column to field 1 but how can I save the unbound columns to other fields in the table?
View 4 Replies
View Related
Mar 19, 2013
I have some issue when i save list view data in a access table.In form I have a list box(listtotalcount) and one text box(ID). In form load event I run a query on that list box like: "SELECT count(id) FROM table A" and it gave me the correct result. Now I want to store this data on a different table (table b) and I use this code:
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("table b", dbOpenDynaset)
[code]....
But the problem is when I click the save button it store only id not the list box value.
View 1 Replies
View Related
Oct 11, 2011
Refer to the image below:
I want to make a form with the following criteria:-
Has one dropdown list. (like in the picture) Has one table. (like in the picture) When I select an item (for example: Syarikat A Sdn. Bhd.), the table below it (yellow circled), will automatically change data according to the corresponding selected list so that user can edit/add/delete the data in the table.
The issue: I already made the dropdown list and table, but how can I make the number 3 condition.
View 2 Replies
View Related
Dec 26, 2006
Greetings all!!!
I have a database containing a table of employees and their rank. I want to record monthly details regarding these people: hours, performance, etc. Their rank can change dynamically from month to month. They may be a Supervisor for a month, and I want to change this value on a monthly basis. But I want to generate a Table which shows all employees belonging to each of the eight departments, but which has empty fields enabling me to record these monthly values. I then want to be able to pull up that data at any time to see these values for any given month in the past. I also want to add the values of each field and total them for the various departments providing monthly and yearly values on a departmental and organizational (grand total) level.
The employee names and their respective departments rarely change. I don't want to have to select their names (about 125 of them) every month to create a new blank form in which to put the monthly data. I want to have perhaps a button which creates the records and puts the names in for (1) department, (2) year, and (3) month, but that adds the fixed fields ready to put the data in. This data is required every month and the field names will never change. I'm sure the solution is programmatically simple, but I seem to have a mental block over the issue.
I hope that someone casts some light on this.
Do I use a Create Table query? (The data can remain in one table.) I would like to do it programmatically. My VB is pretty good, but, it seems, not good enough.
:confused:
View 7 Replies
View Related
Oct 14, 2011
Just fumbling my way around Access 2007, is the only way you can create a drop down list of number by creating a table and inserting a combo box? I am trying to create a list of hours for example:
0.5
1
1.5
2
Etc...
View 1 Replies
View Related
Aug 21, 2013
I created a form and created on it a list box which is a query that grabs certain number of fields from different tables. I would like the user to select from this list box of a choice and then store their selection into a table.This list box has three fields, but it needs to store the id rather than the item, the user would see the name of the item but the id of the item would be store into another table, called bid. It store all these three fields when a user selection one of the item from the list.
View 13 Replies
View Related
Oct 14, 2006
Okay,
The subject is probably confusing but I'll try to explain.
Setup:
Table1
FieldID = Number
FieldName = Text
Table2
FieldID = Number
FieldName = Text
T1_ID = Number
Relationship
Table1.FieldID 1-> * Table2.T1_ID (one to many)
Now, I'm trying to create a 3rd table that has field populated by Table1 and a field populated by Table2 but I want to limit the field populated by table2 by what is selected in the field populated by table1.
Table1:
1st
2nd
3rd
4th
Table2:
1st,January
1st,February
1st,March
2nd,April
2nd,May
2nd,June
3rd,July
3rd,August
3rd,September
4th,October
4th,November
4th,December
Table3:
Table1Field = Number, ComboBox-Source: Table1, BoundColumn=1
Table2Field = Number, ComboBox-Source: Table2, BoundColumn=1
If Table1Field = 1st then
Table2Field Will only allow January, February, or March as selections, since ONLY they are a member of the "1sr" group via the table1 list.
Is this possible, or do i have to do some run-time checking or something?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
View 1 Replies
View Related
Dec 13, 2004
Hi. I just ran across this forum. It looks like I could learn alot here.
I have been searching for some code, and have found two of the three items that I need to make this work. To make this simple, I have two forms and two tables. One form for Contacts (with addresses) and one form that has the Contacts information together with a list of their responsibilities. Say I have the Responsibilities form open, and type in a contact name in an unbound combo box. I believe this was the case, as the unbound combo box was being used to update the contact information down below on the form. I'd like to invoke an event procedure if the contact isn't in the list. I've found various vbscript to handle this in the "not in list" property. If they are not in the list, I'd like it to save the name typed in, open the Contacts form to add the new contact and their information. This I have done. When I close that form, I'd like the procedure to go back to the original Responsibilities form, requery the table (or is it really requery the combo box?), insert the new name into the combo box, and update what contact information resides on the Responsibilities form.
I've seen info on the requery portion, as I've run into the same problem of the name not being in the combo box, unless I close the Responsibilities form and then open it back up.
But I haven't seen an example where everything is put together with saving the contact name (as a variable???) and then putting the contact name in the Contacts form and then back in the combo box on the Responsibilities form.
If someone has an example, or could steer me in the right direction, I'd sure appreciate it. I understand some of this stuff, but don't really have the vbscript understanding. But I'm good at using examples with prewritten code and manipulating to work with my forms and field names.
Thanks in advance for your advise.
Rob (Wannaxlr8)
View 2 Replies
View Related
Feb 21, 2005
Hi,
I’m trying to develop a form for coding data from historiocal documents into a dataset. The form is used to avoid errors when converting ‚questions’ in the codebook to the codes for later statistical analysis.
Some questions allow for multiple anwers – but need to be stored to one field in the data-table, separated by semicolon. Ideally I would have a list-box with the questions and write the codes into one field after selection. Another difficulty is, that later the data need to be read from the table and the selections should be visible in the form (if the table contains „1;6“ items 1 and 6 in the listbox should be highlighted).
I’d be grateful for tips or links to relevant sources.
Thanks!
View 2 Replies
View Related
Jun 11, 2013
I am trying to create a mailing list of patients. Let's say I am creating a mailing list for February. I need the mailing list to consist of people who have had surgery in February from the beginning of the database, and people who have had surgery three months ago, so anyone who had surgery in November. I have created a form that has a button which is connected to a query, the form has a unbound textbox where I can enter the month in (2 for February). Then the query uses the datepart function to search for this month in their date of surgery. But this only gives me people for surgeries with february, how would I get people who have had surgery three months ago in the same query.
View 2 Replies
View Related
Jan 18, 2005
Hi all,
Before I start, please know that I am what you call a newbie to a certain extent even though I created in the last 3 years a very complex and efficient database for my business.
This is going to be hard to explain, but I'll try.
The time came to stop creating the Price List in Excel and copy and paste in Access.(mainly to make it easy for other person to maintain and understand)
I know more or less the tables that will need to be created.
My problem is how to store calculated fields in a table (I know I really shouldn't, but how else can I accomplish this), since all the costs and selling prices are the result of complex formulas.
If this information is not enough to understand my question please let me know.
Thank you for any help.
Emilio
View 10 Replies
View Related
Dec 2, 2005
I have a db which enables users to enter expenses.
tblExpense
tblExpenseDet
tbleExpenseMileage
tblExpenseDet & tblExpenseMileage are joined to tblExpense
As the expenses are entered at User Level not Client Level, I need to extract the Client ID from the 2 sub tables to create a list grouped by client so we can report the billable expenses.
I'm thinking union query but wouldnt know where to start.
Any help would be appreciated
Ta
View 1 Replies
View Related
Sep 3, 2014
Is it possible to create a record set from a list box?
I have two list boxes list1 (customers) the can transfer records to list2. I want to take all records from list2 and use it to open a report, using customer id as where clause in my docmd.openreport statement.
View 4 Replies
View Related
Dec 1, 2014
I have the following tables:
tblOrderDetailsKeyItemIdOrder QtyPO#001A204001002B204001003C304001
tblTransactionsKeyTransDateItemIDReceivedPO#0011/1/2014A1040010021/2/2014B2040010031/3/2014A54001
I also have a table that list the items and on that table the column ItemID is the key.I want to create a query that will list all items ordered on a PO# and how many have been received so far. With that I will calculate the outstanding qty. I want to see:
qryOutstandingPOPO#Item IDOrder QtyReceivedOutstanding4001A201554001B202004001C30030
But all I see is this:
qryOutstandingPOPO#Item IDOrder QtyReceivedOutstanding4001A201554001B20200
It is missing item C because I have not received any yet so there are no records in the Transactions table for it to select.
View 4 Replies
View Related
Jun 9, 2012
How to I can create next record and previous record button in listbox. [URL] ....
View 14 Replies
View Related
Sep 9, 2011
I am brand new to using access databases but I am in the midst of trying to set one up for controlled distributions of controlled documents.Essentially, I have three tables:
1) Listing of all our controlled documents and their properties (doc number, doc title, doc revision, doc type, doc status, effective date),
2) Listing of all our copyholders (name, location, phone number),
3) Document Distribution List which lists copy numbers, quantities, and medium to deliverable (paper, electronic, size, etc)
What I want to do is create relationships within the Document Distribution List (using 'add from existing fields') from the other two tables so when a request for a new controlled copy comes along, I don't have so much data redundancy.
For example, in Table 1, I have listed Document XYZ and copyholder Jane Doe from Table 2 wants to receive 1 copy of Document XYZ. I would like to have Table 3 have an added field from Table 1 where I can pull down the applicable document number, which when selected auto fills out it's corresponding details of title, revision, doct type, status and effective date in this Table 3. In addition, after I select the document Jane wants, I want to have another field added to Table 3 from Table 2 which lets me pull down Jane's name to assign her a copy number.
View 1 Replies
View Related
Jul 5, 2013
I have a spread sheet which on a per line basis contains columns whose cells contain the path to a file. It looks as if many of the files are tif, pdf, word and excel etc, so multiple file types.
Writing a routine which would take each row and then for each line of file paths turn them into one multi-page document - pdf or something?
View 1 Replies
View Related
Jun 12, 2015
I'm trying to create a checklist in my access database that can be assigned to different companies. Is there a way to maintain a blank checklist so that we don't have to recreate it every time we start working with a new company?
View 3 Replies
View Related
Mar 28, 2014
In my access form I provide the user a list of locations from various countries in a listbox . But the list is too long so I provide him a combobox for selecting a country. Selecting the country should update the listbox showing only the locations in that specific country.
So my SELECT from the listbox must cover the unselected state and show all entries and when a country is selected it must narrow the selection.
I tried to get this happen with the following SELECT statement containing a variable. Choosing a country in the Combobox results in a change of the variable and in a requery. This works after the first country is selected and for each country change, but the initial list is empty.
VBA in the loadform
'Application.TempVars.Add "varcountryselect", "*"
SELECT in the listbox "lstlocationsperproject"
SELECT tbllocations.locationID, tbllocations.country, tbllocations.localstreet, tbllocations.localcity FROM tbllocations WHERE ((tbllocations.country) Like [TempVar]![varcountryselect]);
VBA in the combobox
Application.TempVars("varcountryselect") = [Form]![kombcountryselect].Column(0)
Me.lstlocationsperproject.Requery
The values in [kombcountryselect].Column(0) are texts like "SPAIN", "MEXICO", etc.
Any hints, how I have to use the * for getting the complete list on the initial view ?
View 5 Replies
View Related
Jul 15, 2013
I have created my tables and form and am now trying to run reports to organize the data. I have figured out how to group the individuals by group and treatment, but can't figure out how exclude individuals from the final list if they are already in another. As background, some of the individuals are eventually excluded from the experiment, though I keep the initial data. When the exclude individual checkbox is checked ("True" on the report) I do not want the individual to be listed in the "False" list, even though there are entries for that individual when that checkbox wasn't checked (when it was "True"). This is so I can get an idea of the current totals in each group.
Implant Period
>Treatment
>>Exclude individual?
>>>Individual ID
I feel like this should be a fairly simple task, but I cannot figure it out... Maybe there is coding to exclude individuals from the "False" list if they are already listed in the "True" list?
View 4 Replies
View Related
Nov 20, 2013
Allen Browne's "Use a multi-select list box to filter a report" solution, in particularly with two multi-select list boxes? The code works fine for me for either box so long as I code it for one box alone. Combining the two into one code results in a type mismatch error. I'm trying to use the code to pass the contents of both multi-select boxes as Where conditions to a report. Both boxes are based on number fields. To try to isolate the problem, I've removed Allen's setDescription and OpenArgs conditions. We're unfortunately still on Access 2003 as the company desires to squeeze every dime by using until end-of-life next year.
Code:
Private Sub cmdPreview_Click()
On Error GoTo Err_Handler
'Purpose: Open the report filtered to the items selected in the list box.
Dim varItem As Variant 'Selected items
[Code] .....
View 14 Replies
View Related
Jan 2, 2014
I have created listbox with one column (contains one column only), now i would like to display all the characters of list item (want scroll bar to listbox).
How do i display all text of list item, I have already fixed Column Widths to max length (22";0.1"). However when scrolling to right, it is going to next blank column of list box, which is created only to change Column Widths property.
View 12 Replies
View Related
Jul 22, 2012
I'm creating a simple database to document our supplier's contact information, addresses etc. However, when I create a combo box on the form and try to enter a record not on the list it gives the message "The Text You Entered Isn't an Item in the List".
View 3 Replies
View Related