I'm making a test database for DVD rentals. When A loan is made I have an update query that sets some fields in the DVD copy table. One of these fields needs to be set to the primary key of the loan made. This would be the last entry on the loans table. I don't have any idea what to put in the 'Update To' box in the query though.
Wrong code here, but this may help explain what I am trying to get: Tables.Loans.LastLoan.Loan ID
Also heres an image of my query:
http://i92.photobucket.com/albums/l15/mikegrundel/Accessproblem.png
I'm working with a form (MainF) ... which has a subform (MainSubF). The subform has buttons that link you to other forms. When you click on one of those buttons, I have a control number that links the two forms by putting a CTR field into the linked form with a ctr defaul that = forms!mainf!ctr.
My problem is that I'd like to use this subform on other forms. However, if I put the subform onto another form such as "MainTwo", none of the buttons on the subform will work because the path is now wrong. Is there a generic way to connect the buttons to whatever form the subform is attached to??
right all tables are like a 2d array so does any body know how i can access a field in a row of a table ie like in most languages it goes a bit like this ArrayName(1,1) with ArrayName being the name of the table and that access the first field of the first row. im new to Vba and access 2000 but all i want to do is access the fields in a column of a sub-form displayed as a table add them all up and place the answer in a text box on the main form stick all this in a function so i can run it inside a macro
:rolleyes: hi i am raza. i am facing a problem while accessing the properties page of access table. when i gets its properties page it has no properties on it.i have attached the pic wich can explain the problem. pls tell me if any body can solve this problem. thanks. raza
I have developed a small database with 3 or 4 forms which works ok on most PC's. But when I put it on a certain PC, it almost works properly except for one form which is very slow accessing the table! Eg. It could take 2 minutes to use a combobox.
All PC's have Access 2000. Would there be a reason for this? Is this an access problem or a PC problem? Are there special settings that I'm unaware of?
Hi folks, I have an Append Query (Insert Into...) that I use to insert values into a table from a form. But to have that tie into other tables I need to gather the Student_ID (primary key) that is autogenerated when the record is inserted. How do I do this? I want to store it in a public variable. I've done quite a bit of searching but nothing of any value has turned up. Please help.
What I have on button press: DoCmd.OpenQuery "Register Camp Students"
After that I need something to gather that newly inserted Student_ID and store it for later use. Please help!
I've got this simple thing.. which I couldn't do and stuck for a long long time.. I have done some programming in a few languages, but not in SQL or VBA and I quite confused about programming styles that VBA and SQL accepts.
I'm currently working in Microsoft access and the thing I'm stuck on is retriving field value from a record and writing into another record on the same table.
For example the table "Table-users" looks like the following:
ID Name Year Month Date 1 Steven 1979 9 18 2 Jeremy 1977 10 22 3 Eslynn 1988 10 10
I've built a form that contains two lables (combobox), "ReplaceMe" "LoadMe" and a command button. Which end user could choose which record to load and which to replace.
I wish to copy Year, Month and Date from LoadMe into ReplaceMe without effecting the Replace me ID and Name.
The VBA, SQL code i've got looks like. ----------------- 'Command_Click is the tigger button to active the following code. Private Sub Command37_Click()
'Below is an example of what I wanted to do field by field. However, in the real 'environment, I needed to move about 20 odd field into another object. I'm not sure 'to use Append or Update Query Dim UpdateSQL As String Dim text1 As String Dim text2 As String Dim text3 As String
'this loads the string containt-the Name of the object-into text1. 'this line works fine, arr.. other ones don't....... text1 = Me!ReplaceMe text2 = Me!LoadMe 'Load the month of the LoadMe. text3 = Table![Table-users = text2].month
'Loads the SQL instruction into UpdateSQL 'Table-table is a table, containing several objects and fields. UpdateSQL = "INSERT INTO [Table-users].text1( [Day], [year], [month] ) " & _ "SELECT Table-users.Day, Table-users.year, Table-users.month" & _ "FROM Table-users" & _ "WHERE (((Table-users.Name)='ReplaceMe'));"
DoCmd.RunSQL UpdateSQL
End Sub-------------------- Well the obvious, the above code doesn't run. If LoadMe = Jeremy, ReplaceMe = Steven, the above code should return:
ID Name Year Month Date 1 Steven 1977 10 22 2 Jeremy 1977 10 22
Making Steve's Year, Month and Date field the same as jeremy
======================
What I think i'm confused about is when do I use [ ] ( ) ! .
Like... if I wanted to read the field value of "Date" from the object from the "Name" in combo box "LoadMe", what should I write?
ie, if the combo box "LoadMe" contains Eslynn. The end result should be 22.
I have a database with a number of tables 2 of which are:
# Personal Members Table (with all their details and addresses and contact details) # Organisation Table (including who are members of this Org)
My conundrum is this; In the Org table I have just created a 'Treasurer' Field and want to choose a name from the Members Table so that I do not have to put the data in twice (which is what has happened in the past.)
I have linked the tables and but within the Members table the Field names for the Personal Name are as follows <FirstName> <LastName> and there is another for the <Org> they are connected with...
In the Members table it would also be good to have the ability to hover the mouse over the <org> field (or click) on it and then underneath a box appears with everyone who is a member of that org. I have seen this working on another database but cannot seem to replicate it here for some reason?
I have a set of maybe 5 template word docs which I populate with info form our database using bookmarks , the word docs are currently sat in a shared network drive.
I have started wonder if it would be better to store them in a table and call them from there to keep things together.
I have a code to add links to files into a field, I recently migrated from Windows 7 to 8 and the name of the folders in 8 are different; therefore the database I have does not find the linked file anylonger.
To avoid this happening in future, I would like to have the option for the user to set the folder path through maybe a table and then the link will refer to the settings in the table.
Currently I am using the following code:
Private Sub AddLinkDoc_Click() Dim strFilter As String Dim strInputFileName As String Dim varDirectory As String varDirectory = "C:UsersMarco TagliaferriDocumentsBA CityflyerCrew SchedulerDocumentationDocs"
I'm building a DB where I have multiple users. I would like to have all data in 1 table but only give access to records created by the individual user. Is this possible?
Alternatively, if each user has it's own table, how can I report on the sum of all tables.:confused:
Is it possible to access a table in one Database (Database A) from a separate Database (Database B) and if so how. I should clarify that this is an Access Database.
database is on laptop, the pc downstairs can open and access the db fine, but the pc next to it upstairs can see the db but gets an error on opening - of course they are using a german version of access so im not entirely sure of the error message but its basically "cant open the db on this intranet, copy it to your pc and then open it"
all pcs are running xp and the same version of access (2002) the db is in the laptops shared docs folder one pc can open it fine the pc in question can open and edit a word doc (for example) in the same folder but not the mdb i can map the drive on the pc as well
it seems more of a win xp file permission thing but the pc can open and edit a word doc ok
the only thing (seemingly) different with the 3 pcs is that the problem pc is in english and the other 2 in german (but why that would matter i dont know)
i'm supposed to be the pc guru but this has me stumped - any ideas ?
I got a little problem here. I have a mdb that must be moved to another pc, but whenever I try to open it (on the other pcs) I get the message that I don't have permission to read. When I try to change the permissions it says that I must be an administrator to do that, but I am the pc administrator, so I guess it must be the mdb's administrator. Does anyone know how to change the permissions, or how to make me the program's administrator/proprietary? Thanks for your time people!
I have copied a database that I used for another project for a new one. Everything is the same but when I try to use the command buttons on the form it give me "no record found" error, even though there are records in the database. I know that the Error message is the one that is writin in the database by the orginal designer, I can't quite figure out how to fix the problem I think that it has something to do with the VB coding in the comand button, becuase of the type error message that I am geting, but I don't know how to do it. I can't post the database becuase it is way to big. Everything else is working fine. What hte command button is supposed to do is update a total score percentage based off the numbers that placed in the database also any of the score can be left blank as to not count, max for each score is 5 min is zero, i.e.score1=3score2=5score3=5score4=score5=4score6=3Total Score =80.00%I hope that this makes sence.J
I have time entry program that the company I work for recently purchased that uses a SQL server 2000 Back end. I can connect to the database just fine if I create a project in Access. What I need to do is take data out of a couple of the tables in the SQL Server and place them in an access table. I really don't want to add any code or tables to the Access project that I created since it seems it would add tables and queries to this products database. What would be the best way to siphon data out of this software package for my own use? This would become a daily process so it needs to be fairly automated and easy.
I am creating a database to keep up with the expenses for my art business. I have a table for Vendors with a field (Mileage) for one-way mileage that I enter manually (EX: 11.8 miles). Then I have a calculated field that basically just multiplies the Mileage field times two to get total mileage to and from my house to vendor location. (Total Miles) {The reason I want to do this this way right now is because I didn't keep up with my mileage this year and I am having to look up the distance from my home to each location)
Then I have a "supplies" table where I show the date, the vendor, the item, cost, etc, and I want to add a Total Mileage field based on the calculated Total Miles field in the Vendors table that will automatically populate based on the vendor of each transaction. I just can't remember how to make this work and I know just enough SQL to be dangerous.
I have started work on a database to track the many (several hundred per annum) projects my company undertakes. A 'main' table lists projects, their fees, their key dates, their project numbers, etc. I have created another table for tasks. Each task is assigned to a project (via the project number), and may be 'open' or 'closed'. I have separated the tasks table from the projects table as there may be several different tasks for each project. It is also good to keep a record of the tasks.
I want to prepare a report from the projects table that lists projects IF they have any open tasks.
In my mind, this means 'If a task, with the corresponding project number, is open, put a 'Yes' in the 'Tasks open' field of the Projects table.'
I have a table called Inventory (table1 - PK=INVID) that contains all inventory ID numbers and descriptions. I have another table called Inventory Transactions (table2 - FK=INVID) that gets updated through a form. When a new transaction is made in table2, I want the transaction amount to get added or subtracted to an OnHandQty field in table1. I tried having table2 (transaction table) as the main form and then table2 as the subform, but I couldn't get table2 to update.
Ok, Let's say I go into File->Database Properties from the "main" Access screen. This brings up a window with the title "<database name> Properties" where <database name> is the same as currentproject.name.
This window has several tabs including "Summary" and "Custom." It looks like this should be stuff that I can set and then reference from within my code.
My thought is that I can use the "Title" from the "Summary" screen as a variable for all of my msgbox titles. The other interesting one is "Project" on the "Custom" tab. It looks like this may be the same sort of thing.
I've found that the Access Help is absolutely useless - I'm about ready to take a shotgun to "Clippy." But as they say, a display is a terrible thing to waste <grin>. I've also found that it's getting harder and harder to find what I'm looking for in the MSDN library. There's so much stuff and they don't always file it in logical places.
Well, thanks for reading.. sorry for the rant. As usual, any help is appreciated!
I've got a back end database on one of my computers and i'm trying to get the link tables to work over a network from another computer. Ive set the link tables up but it wont let me edit any data because it is read only. Its not read only when i run the front end from the computer that stores the back end. How do i enable the front end to edit the data over the network?
also, it is a multi-user system so i want multiple front end parts accessing the one back end but whenever i try and access the data from one system when another is already open it says the file is in use and i can't do anything!
I'm really stuck at the moment and i really need some help please! :confused:
I am making a database and after a small amount of progress I save it and then copy and save with same name but with an extension V1, V2 etc. so that I can keep a working one as backup. Throughout this process I have come across 'Error accessing Network' connection may be lost.....! I have to go back to my previously saved version and redo the changes I was making. This time I didnt save until I was about to make my usual backup and I had quite a few changes. How can I stop this happening and make my last DB work again.
I have split db with the backend residing on a computer in my workgroup in the shared files folder. I have access to the folder and can view the file perfectly fine on the other computers in the workgroup (a wireless 54Mbps network). The problem I am having is that almost every time i access the backend tables from another computer in the workgroup, access freezes up and has to be shut down. Sometimes, after restarting access it works fine, others not at all.
Any suggestions or help would be greatly appreciated.