Why New Records Being Moved To The Front Of Other Records
Jan 27, 2014
I'm not sure what I did, but when I enter data into a form, say it's record 10 and I click record 11 to start a new record. I can then go back to record 10, and it's still has the data I entered in the form. As you know this part is normal.
The problem is when I save and close the form and reopen it, record 10 now has the data from record 9, and the data I had entered for record 10 is moved to record 1, which is in front of my other records. It continues to do this, and I am now at record 4, which should be record 14 and I do not understand why it's doing this. At first I thought it was deleting my new records until I found them in the front of my already created records.
I could just leave it, since all my records are still there, but it's frustrating expecting your last record you enter to be at the end, instead to find it somewhere else.
I'm still learning, so I hope it is just a setting or entry I need to change.
I am new to using access and have customized a project management database for a friend's company. I need a way to auto relink the front end and back end databases when moved in the same folder. I am currently using Access 2013 and have already tried using the code on this site: [URL]...... Does this code not work for Access 2013 or am I adding it incorrectly.
I have built an Access 2010 split database on my computer and it functions as built. My next step was to copy it to the server at work and test it. I discovered the tables had to be re-linked and so did that. As I have read in the Access World Forums in order to function as a multi-user database a copy of the front end must be placed on the individual workstation with the back end residing on the server, however the hyperlinks in the back end will not function when the copy on the workstation is run. I simply get an unable to open "filename" error pop-up. I can run the server copy and everything functions as built. I know that the hyperlinks require all the files to be in the same folder (relative vs. absolute), but if the back end contains all the hyperlinks why does the location of the front end seem to affect the operation of the back end?
In an Access 2010 form is it possible to export select records and fields in those records to a specific location?
Code: Set objDialog = Application.FileDialog(4) With objDialog .AllowMultiSelect = False .Title = "Please select a File" .InitialFilename = "C:" .Show If .SelectedItems.Count = 0 Then MsgBox ("Action Cancelled") Else
[code]....
The user can select the directory using the code above, but can specific fields in records be exported to a excel workbook in that selected directory?For example, if the are 5 records in the database can the fields LastName,FirstName,BirthDate in records 1,2,3 be exported to Setup.xlsx in that selected directory?
I have a table (tbl Team Info) which contains names and codes for teams within my business (>400 records) and another table (tbl Process) which contains a list of high level tasks (30 records).
I need to create something where for each team name 9in tbl Team Info) I can map them to the tasks that they undertake (in tbl Process) and assign a percentage of time then spend on each task. Each team could map to several different tasks.
In my simple database (attached), I need to mass duplicate Tasks and their Notes.
I have three tables: tbTasks (PK: Task_ID), tbNotes (PK: Note_ID), jtbTaskNotes (FKs: Task_ID and Note_ID). jtbTaskNotes is my many-to-many junction table that ties Tasks to Notes.
The main form (fmTasks), bound to tbTasks, has a subform (sbfm_TaskNotes) that displays notes associated with each Task. On themain form,you select which Tasks you want duplicated via a checkbox. The append query (quCopyTasks) will duplicate all tasks that have the checkbox checked. All good there. However, I can't figure out how to also duplicate each task's Notes.
I found Allen Browne's solution [URL] ....., but that only handles duplication of one record at a time, whereas I need to duplicate many records at a time (sometimes 10+ records). How do I go about duplicating multiple Tasks and their associated Notes?
Before you ask "why are you duplicating records?": There are times when tasks need to be re-accomplished and therefore need to have a new record. It's easier to duplicate records than it is to hand-jam everything again.
One shows my form with the Transporters Subform with 3 entries, and 1 entry.The three line items that say "Transporter" are in one subform. I used this code
Code: Private Sub Form_Current() If Me.RecordsetClone.RecordCount >= 3 Then Me.AllowAdditions = False End If End Sub
to limit the number of records I can add to 3 or less.My issue is that I lost the blank text box that allows you to add another record. So, if I only have one Transporter listed, there's no box to let me add a second or third.I have the following properties for the Transporters Subform set to "Yes":
Data Entry Allow Additions Allow Deletions Allow Edits Allow Filters
I have built a qry that initially shows the correct information. For example.
tblContent has 289 records with a Type = Class.
I built a Query to select from tblContent Type = Class and I get 289 records. I add additional criteria of Progress <>"Not Scheduled", I then get 206 records. I then add additional criteria Last Name <>"Demo" And <>"Care" And <>"Support". This brings up 200 records, but the query appears to duplicate each record 3 times. I do not have 3 of the same types of records.
The SQL Statement is below
SELECT tblProfile.LoginName, tblProfile.FirstName, tblProfile.LastName, tblProfile.Organization, tblProfile.CostCenter, tblContent.Title, tblContent.Type, tblContent.Code, tblContent.[Date Assigned], tblContent.[Date Started], tblContent.[Last Accessed], tblContent.Progress, tblContent.[Date Completed] FROM tblProfile INNER JOIN tblContent ON tblProfile.LoginName = tblContent.LoginName WHERE (((tblProfile.LastName)<>"Demo" And (tblProfile.LastName)<>"Care" And (tblProfile.LastName)<>"Support") AND ((tblContent.Type)="Class") AND ((tblContent.Progress)<>"Not Scheduled"));
The qry is named qryPhysical Class. I have provided the link to view the database. Can you help me?
All seemed to be working well, however, I noticed that all my subtable records in the database are exporting with each Primary table record. In my output, I'm looking to see each primary table record followed by one or more subtable records from a one to many relationship.
(Office 2010) Access/Word
Private Sub cmdPrint1_Click() Dim objWord As Word.Application Dim docm As Word.Document Dim db As DAO.Database Dim rstLandSales As DAO.Recordset
Dim dbs As DAO.Database, sql As String, rCount As Integer Set dbs = CurrentDb sql = "DELETE * dbo_InvPrice Inner Join (dbo_InvPrice Inner Join UpdatedPricing on dbo_InvPrice.StockCode = UpdatedPricing.StockCode ) ON on dbo_INvPrice.PriceCode = UpdatedPricing.PriceCode " dbs.Execute sql, dbFailOnError
I have a form which needs update ever month. When the form is opened, the end user can see the old records and data, and also a new record is added for any new data. I want to protect the old saved data and the user can only add, edit, or delete the new data in the newly added record. The problem is once a user adds the new data and moves to another record or another form, then he/she cannot edit or change the new data in case if there is any mistake or need to change something after couple of minutes.
I changed the Form Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" many different times and situations to solve this problem but with no success. I tried the following with NO success too: One of the Fields of the Record is (Month). In the Data Properties, I set a Default Value for this field as(December 2014) for instance. I set the Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" to (Yes). Then I put the following code in the Form's Current Event:
Private Sub Form_Current() If Me.month.Value = "December 2014" Then Me.AllowAdditions = True Me.AllowEdits = True Me.AllowDeletions = True
So looking at the tables, C1 = 2 C2 = 4+6 = 10 B2 = C1 + C2 + D4 = 20 A1 = 20 + 10 = 30
Here, there are 4 levels that I have to go into to get the grand total. If I did not know how many levels there were, how would I be able to do this through code? through queries if possible??
If anyone could help, that would be great! Thank you in advance.
I want to find duplicate records based on FirstName and LastName and delete the duplicate. Also, I want to delete any records which have a blank FirstName and LastName.
I have form setup with two cascading combo boxes (facility and date) to select a record (other navigation, including mousewheel, is disabled). There is a button to open another form which allows addition/deletion of records by facility and date. When this form is closed, the combo boxes update accordingly on the initial form. However, if I select a new record whose facility/date I have just entered, it seemingly shows the wrong values for several of the other fields. If I check the corresponding table, the values are actually at default, though, and when I reopen the form they have reverted to default. Any ideas on how to solve this? I'm tempted to simply have the first form close and reopen when the second is closed, but couldn't figure out the syntax to close a form with a button on a different form. Let me know if there's any more information I need to provide. Thanks for any suggestions.
I have a mainform with 4 fields which are marked with 4 primary keys: soldtoId, shiptoID, PlantId and formulaID. PlantID is a long integer number field and the other 3 are text fields. there is no default values.
I have a subform1 that is linked by PlantID and FormulaID. These 2 field names are in the linked child fields.
I had a handful of records established already. Today, i added a command in the after update section of the PlantID field in mainform by adding Me.Refresh. So when i change the plantID in the mainform, the subform gathers different plantID and formulaID data automatically. works nicely.
Here is the rub. I next tried adding NEW records to the mainform. that's the one with 4 primary fields.
i enter soldtoID and shiptoID fine. they have no refresh need. however, after the enter a PlantID, the me.refresh kicks in before i can get the the formulaID field. i get a debug error. something about a NULL. which i suspect is the formulaID that i didn't get a chance to enter to. FYI, later, i want to put a refresh on formulaID too.
so how can i make some kind of Refresh work for both New and existing records?? penwood
I have a user login code am using for users to login and only access their records in a subform according to their user ID and access level (user or admin). On the main form I have a user name field, the password field and two other fields: one to hold userID and the other to hold access level.
I also want if the person logged in has "Admin" access level the subform should return records from all users. For now what is happening is that even when I assign myself with "Admin" access level, the subform is not returning all records from other users, but my own records only. The original demo where I found the code worked well but I cannot find it and I am totally lost on this.
Here is the code I have so far:
Code: Private Sub cmdLogin_Click() Me.Hold_User_ID = Nz(DLookup("User_ID", "T_Users", "Username='" & Me.UserName & "' and pword='" & Me.PWD & "'"), -1) ' check to see if we have a good login If Me.Hold_User_ID = -1 Then MsgBox "Invalid username or password."
I have a database with a table with company names, then a relationship to another table that shows that companies' address, but I also want there to be an address 2 and 3 and so on, and some of our companies have multiple sites.So what Im asking is how would you be able to show multiple data, on a sing record.
I have just found out that my admin team have re-named all my folders so now teh folder that my DB was in is called a different name, so now my DB wont open as it says that it can't find teh file (as its still looking for teh origional folder name).
Is there an easy way around this? (I cant change the folder names)
I have a form that I use as a switchboard for a database. It automatically opens whenever I open the database and contains various buttons that allow me to import new data, run reports etc.
It has somehow moved a long, long, long, long (you get the idea!) way down the 'page' - i.e. the scrollbar to the right of access is enormously long with this form at the bottom and enything else I open at the top. This means that whenever I use the database any other forms, reports etc that I open are so far up the page that I cannot see them. The only way to reach them is to maximize everything. However, this makes it difficult/impossible if I need to, for example, see the design of two queries at the same time.
I have spent half an hour slowly moving the form up the page manually, but I don't seem to getting anywhere. Is there anyway to return this form to the top of the access page?
I currently have a database that I had to copy over each field from another databse to create the one i have now. When i copy the records from one field over it appears they all move up three spaces for some reason is there a equation i can enter to make them all move down three records in the table?
Is there anyway to stop the user from beng able to move a form. I.e. as in change its position on screen.
I am aware that you can do this by setting the border type to "none". However, I want my form to have a title bar along the top, so I cant use this method.
Is there another way to do this?
Thanks in advance.
EDIT: Ive found some information on the "movable" property, but I am using access 2000 and cant get it to work.
Suddenly my database started to act wierd. Look at the attached image. I can't move the window containing all the forms and tables. And I need to point out that I didn't place it there myself...
How to move it? I tried everything I could come up with, i.e. remove the toolbars, changing size of tha window and the programs window, restarting, re-saving, etc.
I have an open form with buttons to open other forms and use an If statement to position them an example is below.
Code: Private Sub Command31_Click() DoCmd.OpenForm "Opener", acNormal If Me.Frame54 = 1 Then DoCmd.MoveSize 2500, 1000 ElseIf Me.Frame54 = 2 Then DoCmd.MoveSize 25500, 1000 End If End Sub
This works perfectly, however I need to put similar code as a line in a macro and cannot seem to link it.
Code: Public Function totalmove() If Forms.Scan_Data.Frame54 = 1 Then DoCmd.MoveSize 2500, 1000 ElseIf Forms.Scan_Data.Frame54 = 2 Then DoCmd.MoveSize 24000, 1000 End If End Function
I get Error 438 object doesn't support this property or method...
How can I get a Query Criteria To Select All Records or specific records in query design section.
I have a table that shows many departments with credit card transactions. I like to run a query to see specific department, or have an option to see all the departments when the query is run.
I have had a client moving to a new server a couple of months ago.
They have a small access application that reads csv files and exports them into Sage format that can then be imported into their accounts program - it also reports the total invoiced (whatever is inside the data CSV file) and has a printer friendly report with all the invoices inside said data CSV file.
The issue I have is that since the little app was moved to the new server - it stopped working.
I think somewhere in the code / options there is place to state the working path for the app. I think the app is trying to read the input data file from the old shared folder and thus not working anymore.
I can post the code and a sample CSV file. Specially because I did find a place with the old path and changed it to the new file share and it still didn't work.