How To Make Creation Of A Record In A Table Trigger Creation Of New Table
Jul 17, 2013
I have a table that is a list of all of my events. Each record of events should have a child table that list all of the things that happened at the event. When a new record (event) is added how can I have a new child table created and linked to that record. Also I have a blank table to serve as a template for what each child should look like. How do I make sure this occurs? The child tables can have the same name as the index. I am just using numbers 1- for the index with 1 being the first event and so on?
I would like access to automatically create a record in the contracts table when I change the status in one of the Customer Fields from prospective to Customer.
The two tables are linked using the Customer ID field.
I created a new table for my database that contains three fields. A first name, last name, and a full name field. Is there a way in the definition of the table that I can define the full name to =[TrackComposerFirstName] & " " & [TrackComposerLastName]? I'm not sure where I would define a formula in data elements of a table.
I have created a table containing jobs that need to be done from my team (IT production). Each time someone start or finishes a job, he must fill a box that updates a specific row in the table. I want to log the time of that action.
Any ideas of how I could set this up in Access? I have tried the Now() function in the Default Value of the field End Time, but this is updated everytime I refresh the table
I need some advice for an ASP.NET web application I am working on. I am trying to automate the making of a new table within a database and then have all records from an old table migrated to the newly made table. I would like this task to run from the scheduled tasks on the server in the way of an .exe
The new table would be created on the first day of every month, taking the name of that month. I was thinking to use an empty template table which already has all the fields, and then making a copy and renaming it to the current month.
After the new table has been created I need to copy all the records from the table that represents the previous month over to the new table that represents the current month.
Is it possible (and logical) for me to create a table with a calculated field from 2 other fields in the same table? Example; I have a long time field (mm/dd/yyyy hh:mm:ss) aka StartTime, and a long time field EndTime. I would like to subtract the StartTime field from the EndTime field to get the total time elapsed, but in hh:mm:ss format. I can get it in hh:mm format, but I really need the hh:mm:ss format. Any Ideas? :cool:
Hi all- I work for a staffing firm and I'm trying to figure out a way to turn exports from our vendor-based sql gui (i.e. I can only get .xls files out of it, can't just run SQL queries) into spiffy reports using Crystal Reports. My grand plan is to use Access to process these various XLS files (one for each client) by linking them to an Access DB and coding a table to conditionally tally individual records based on different criteria.
The criteria are company name, position name, date submitted, active, and status. I was able to code an Excel template that did the trick perfectly, but required each file to be edited to reflect the new report format, and updated as more positions are added. My question is this: is there some way for me to create a DB that links to the XLS files for each client and puts each company name, position name, date submitted (pulled straight from XLS files) and then the following tallies:
submitted (just # of pos name by date) accepted (status != "s" AND active = "y" by date) etc.
I don't really expect someone to do all my coding for me, maybe just point me in the right direction, as the only coding outside of excel formula coding (which I feel doesn't really count despite my proficiency) that I've done has been over a decade ago. Any suggestions?
I want to create a dynamic page which will be composed of quite a lot of elements and will be filled with elements from my database. First is the headline, 10 or so attributes, separate. Then 30 lines on the same model : Title (different for each line of course), Boolean, String, Date, Another String, Another Date, Another String. These lines are independent. There will be approximately 1000 pages. I wonder if I should create one huge table with everything in it (like Id, Headline, Title1, Boolean1, String1, Date1, String1, Date1.2, String1.2, Title2, Boolean2, String2, Date2, String2, Date2.2, String2.2, ...) or one table for each line (on the model : IdPage, Title, Boolean, String, Date, Another String, Another Date, Another String) plus the headline in a separate table? I think I should take the "lot of tables" solutions, am I right? will it be a problem for Access?
I am wondering if anyone can recommend shareware or free ware Utilities/code to make Form & Report Creation/Edits easier?
I'm thinking of something like Cub Editor http://www.peterssoftware.com/ce.htm or SmartForm+ http://www.aadconsulting.com/smtfrmplus.html
but alas .... I can't do anything that will edit the registry (company politics says Access and it's Wizards is plenty 'perfect' http://www.dbforums.com/images/smilies/frown.gif maybe I will convince the powers that be but not in short time)
Also the code (or forms / reports built) need to work on Access 2000, 2002 and 2003. or well-commented on how to modify as I'm only modest with writng VBA code.
i want to have a feature in my database like the following..
these are basically day to day clock in times for my staff..
is there a way that everday.. a new record will be created..
eg.. on 04/06/06... i turn on my pc for the first time.. and when i view the timesheet form.. a record for today is automatically created.. then throughout the rest of the day, this form will be displayed..
when i turn on my pc on 05/06/06, the database will know its a different day, so it creates a new record for today... then i can just move back and forth throughout the days to see the details..
if i then turn my computer off for 5 days, then turn it on at 10/06/06, it still should have made records for 6,7,8, and 9th June, but they will be empty, and the record im shown is for the 10/06/06,
I been tasked with a project to be written in access which I am rather unfamiliar with, web design is more my area.
For part of the project I need to copy some pricing fields from a pricing table to a new record at the point that the new record is created. The new record is created when a 'new form' button is clicked.
What I would like to know is what and where I should trigger the copy query from and what function should I be using?
I have a subform with a lot of fields in which require input. I have set the tab order correctly so they go through in sequence. However, I have found when I tab out of the last field. Its creates a new record which I dont want.I want it to either return to the first field to just stop.
I have a multi-select list box for selecting which faculty members apply to a project. The faculty table and project table are linked in a many-to-many relationship. I have the following code which should create entries in the link table:
Private Sub Command5_Click() Dim varItm As Variant
For Each varItm In lstFaculty.ItemsSelected rs.AddNew rs!FacultyID = Me.lstFaculty rs!EntryID = Me.EntryID rs.Update Next varItm
rs.Close Set rs = Nothing End Sub
It successfully creates new records and enters the EntryID and LinkID (autonumber). However, FacultyID is always left blank. lstFaculty is the unbound list box which has three columns from the faculty table and is bound to FacultyID. Any ideas on why FacultyID isn't created in the link table (I get no error messages)?
Also, any ideas on how to prevent duplicate links being created every time the button is pushed? I was planning on having it first run a delete query for that EntryID in the link table so that it replaces the old links and any that have now been unselected are no longer linked. Comments on that idea?
Thanks again to everyone on the forums for your help.
Nutshell: My user DB has one menu with 4 tabs (2 for adding records, and 2 for searching/editing records). Since the form opens up in the acFormAdd mode, Access already creates a new record (blank) before they type anything. It is resulting in blank false new records that are getting added to the table and they are getting annoying. My audit table is full of "user X created new record at this time" when it's just a blank record.
There must be a way to prevent this using VBA, but I cannot find it.
I've seen ways to disable "add new record" buttons and such, but nothing that disables Access from being smarter than me and creating a new record before I decide to.
What I would like to do it take all 'RoleTitle' from RolesList, all 'CourseID' from courselist and show them as a pivot table/matrix with a checkbox that creates or deletes entries from the RoleRequirements table. So, if it exists in the RoleRequirements table then it should appear a checked, unchecking it would delete it from the table.
I am using access 2010 with a SQL server 2005 backend.
I think my question is fairly simple - fingers crossed.
I want to create a field that, whenever a record is added, it auto-adds the date & time the record was created. I'd call it Book_Date_Added, or something like that. I tried snooping around the Default Value options but couldn't figure it out.
The table exists and it already has some records, so I'd need to know how to add this field rather than how to create it when I create a table (although that would be helpful too, if it's somehow different).
I Have a form that shows bills in a continuous form. My problem is that I want to put a textbox or a label that will display a kind of counter for each bills. For example, If I have 3 bills to display, I want my label or textbox to display 1 for the first bill, 2 for the second, 3 for the third, and so on.
But I don't know how to do that with a continuous form.
I am attempting to create a report that the user can specifiy a contact type which is selected from a drop down list and the report will only show those records. The name of the report is "Contact Listing bu User Supplied Contact Type." I also have a form called "Report Contact Selection." Right now I am getting only contact type of "recruiters" to appear when I run the report even when I select a different contact type. As you will see when you look at the "contacts" table, I do have records with different contact types. I am including a *.zipped version of this database and if you should need any additional information, please feel free to ask. Thank you.
In a field “NAME” I have “Adam Smith”. From this field I want in a QBE window (not in VB) to make two new fields “FIRST NAME” “Adam” and “LAST NAME” “Smith”. In Excel there are the functions FIND and SEARCH with which I take the number of the gap “ ” (5) between Adam and Smith and with the functions LEN, RIGHTS and LEFTS I have a result. What could I do in Access 2003?
I have a continous form bound to a query which also has a group by function. Is it possible to create an editable bounded textbox because Access is giving a message saying recordset not updatable.
I been browsing and I seen a few statement regarding a timestamp that displays when you create a new record so each new record would have the time it was created. What function is this?
why is it that as soon as you fix one problem another one needs dealing with :mad:
OK, the problem i have is that i have a BE/FE configuration database in a multiuser environment. I have built all the tables and the relationships in the BE configuration. In the FE configurations i have built the main forms to input data. It has no come to the point where i have begun to create the queries to allow reporting and data searching. And this is where i have a problem. I am trying to create a simply query and i do mean simple (at the moment i simply want 2 fields from 1 table and 2 fields from another table) no calculations or anything i just want it to display the data. I have tried creating this query numerous times and i keep getting the same error.
"The wizard is unable to open your query in datasheet view, possibly because another user has a source table open in exclusive mode. Your query will be opened in design view"
the above is the error i get when i use a wizard to create the query, after getting this message and going into design view i try to view the results in datasheet view and get the following error "Type Mismatch in expression"
If i dont use a wizard and create it in design view, when i go to view the results i get the second error message everytime.
If i create a query from 1 table only the query works without errors, but i always get errors when i have more than one table in the query.
Also i am the only person with the database open so therefore it is total impossible for the database to be open by another user in exclusive mode.
Anyone know what the problem might be or how to fix. Your answers will be very much appreciated.
Im pretty new to access and im trying to create a database for the company i work at so that to begin with they can log details on all hardware they have.
See the image attatched, at the moment i wish to store details on there computers and also on other hardware is it ok sofar? http://img210.imageshack.us/my.php?image=erd9xa.jpg