Records Coming Through In Wrong Order!!
Aug 19, 2005
Hi,
i was working with a database and accidently deleted the first row, i couldnt get the automatic number to number another row 1, so i took out this table and created another one. however even though my new record is in order, when i pull this through to the website it's coming in the order 1,3,4,5,6,2... and the coding for the page worked fine with the db beforehand!!! so now i'm a bit lost
if anyone has any ideas, they'd be appreciated!!!
Thanks in advance!!!
Megan
View Replies
ADVERTISEMENT
Jan 11, 2008
Hi everyone!
I have two columns. In one of them I have daily dates and in the other I have some numbers. What I'm trying to do is to sum the numbers weekly by entering this in the field of a query:
Week: Format([Date];"yyyy ww")
The problem is that when I go to datasheet view, it is sorted wrong.
It looks like this:
2007 1
2007 10
2007 11
2007 12
.
.
.
2007 19
2007 2
2007 21
But I want it like this;
2007 1
2007 2
2007 3
2007 4
.
.
.
2007 9
2007 10
2007 11
and so on...
The other column has the rihght values for each week, but I need it in the right order...
What am I doing wrong? Or how can I fix it?
Thanks in advance
Jake
View 8 Replies
View Related
Feb 26, 2015
I have a cool little form for the use of the organization's treasurer wherein she enters checks and deposits. I have a query that generates a running sum, so each line in the accounting report based on the table has the account total as of that date. The query behind the report is exactly what I want and is in the correct order. For example, the four transactions for 9/15/2014 are in the order entered, and the line total is correct. The report insists on listing the 4 in the example in some other order with or without OrderBy specified. With code from someone, perhaps on this forum, I added the following to the OnPage event:
Code:
Private Sub Report_Page()
Const TWIPSPERINCH = 1440
' Offset from right edge of Control where our
' Vertical Line will start - adjust as you desire.
' Expressed in Twips
Dim intLineMargin As Integer
[code]....
The result is a beautiful report (albeit in the wrong order) with vertical lines all the way to the bottom of the page.If I remove the OnPage code, the report is still in the wrong order, so obviously that wasn't the problem. OK, I think it is corrupted. I open a new db, import all into it. Still in wrong order. So next, I begin to recreate the report from scratch. Hooray! Right order! But I still want the vertical lines between the columns. So now, I copy the OnPage code and paste it into the new report's OnPage code. I get error message: "Compile error: User-defined type not defined" with the line "Dim MIPSstr As udtPrtMips_str" highlighted. Ok, I delete all of it and reenter it line for line manually, leaving out the comments. Get the same error message. After trying to research it, the only suggestions were to add Activex reference which can't be the problem, because the other version of the report doesn't throw an error and both are in the same db.
I have attached a clip of the report and a clip of the underlying query. As you can see in the first capture.png, the check numbers are in the wrong order and the amounts in the Total line don't sync with the total above adjusted by the amount on that line.
View 3 Replies
View Related
Aug 18, 2015
I have created a multiple field search screen. The script is attached.
I would like to add a MSG Box "No records found" when the user types in information in any field where no records are available.
Just cannot get this working.
View 10 Replies
View Related
Sep 12, 2005
I have a form "Training", with a combo box that holds employee names and a subform with all of their training records linked by "EmployeeID". Quite often lately, when the user selects their name from the combo and the code below runs, someone else's records appear in the subform. There doesn't seem to be any kind of pattern, ie. the previous employee on the list or the next, etc.
Private Sub Combo6_AfterUpdate()
' Find the record that matches the control.
Dim Rs As Object
Set Rs = Me.Recordset.Clone
Rs.FindFirst "[EmployeeID] = " & str(Me![Combo6])
Me.Bookmark = Rs.Bookmark
'Forms!Employees![Combined Subform].SetFocus
End Sub
I have the db split with both the FE and BE on the server and a batch file that runs from a link on our intranet. The table that holds all of the data is at 3,195 records and the db is just under 4MB. I compact/repair regularly.
There are 66 users - usually 3-4 concurrently.
Is it time to think about moving the BE to SQL or Oracle?
Thanks for any help you could offer.
Toni
View 5 Replies
View Related
Jul 31, 2015
So I created a search form which filters my results. Apparently I don't have enough posts to link to the source of the code though. The code is from this website, /forums/showthread.php?t=188663
I then wanted to allow users to double click a result in the listbox to take them to the form which contains details about that record, however the listbox doesn't point to the correct record.
-When nothing is specified in the search field, all records are shown in the listbox, but double clicking on the first record takes me to a form that has no information. Clicking the second record takes me to the Detail Form of the first record.
-When information is put into the search field, the results are filtered and only a few display, however clicking the first result again takes me to a blank form while the second result takes me to the first record of the unfiltered list. There is no way to reach the Detail Form for the last result of the listbox.
-I tried right clicking the results in the listbox and copy pasting the information. The first result gave me a "0", the second a "1", and so on and so forth. This was the same whether or not the information was filtered or not.
-I tried switching to a combo box and got the same results.
View 2 Replies
View Related
Feb 8, 2006
Hi allive just been asked this by a co worker on a remote sitethey have a client name they want to input to a table in Access 2000in a surname field which is just a txt fieldthe name to be input is 'comming'when they tab to the next field access changes it to 'coming'i tried it this end in a new database and it does tha same thing ..and in Acc 97any thoughts ...or a fix?Thanks
View 3 Replies
View Related
Jan 19, 2006
Hi,
I am a bit stuck now and I want to get some ideas from you.
The context first : I am writing a timesheet application and I've got a main form + a sub-form.
In the mainform, I select the engineer, the contract and the week nbr.
My mainform calculates the first and the last day of the selected week and modifies the recordsource property of my sub-form to select the existing records with the right engineer + contract nbr + range of first and last of week. This means that I can only have maximum 7 records for the seven days of the week because the application records only a global time per engineer/contract/per day.
Now I want to know how can I add new records in the subform for the missing days and how to put them in the right order ?
Example: I retrieve from my select in the subform, the times from day 2 and day 4 but I need to generate the missing days 1, 3, 5,6 & 7.
How can i display them in the right order: day 1 (auto), day 2 (table), day 3 (auto), day 4 (table), and so on...
In which event do I have to put code and what kind of code ??
Please help !
View 2 Replies
View Related
May 4, 2005
I have built a table with a field name of Birth date and have applied an input mask to have the data shown as: ##/##/##. Now, I would like to have another field labeled age. Is there a formula that I can create to have access calculate this in my table? I have tried "=mydate()-"Date Of Birth"" in the validation rule under the properties of the Age field; however, I keep getting an error. Any suggestions?
View 2 Replies
View Related
Feb 10, 2006
I am making a database that requires a list of all the crew people in our company. This list is not sorted by alphabetical order but by order of significance (or frequency of) crew person. This list is rather lengthy and if I add a crew person it can only be added to the bottom of the list. The only way I have been able to do this is by manually resorting and retyping the list. Is there any way to add a row in the middle of a table (like I can in Excel)??
Thanks, Joe
View 7 Replies
View Related
Sep 2, 2006
I have a form with a subform. I want the records on the subform to be in alphabetical order of first name. At the moment, they appear in the order the records were entered.
I have opened up the subform itself in design view and specified the record order. If I then switch to form view for this, the records correctly display in alphabetical order.
However, when this form is displayed as the subform, the ordering reverts to the original order of record entry.
How can I change this?
Thanks,
Gary
View 1 Replies
View Related
Nov 10, 2006
Hi, how do I retain the order of my records in a table in terms of when added ie
1st record id = 3456
2nd record id = 1234
3 rd record id = 2456
but when i go into the tabel it is now in order of 1234, 2456, 3456...i dont want numerical ordering!!
Cheers
Tania
View 1 Replies
View Related
Apr 19, 2005
I'm very confused. I have two tables in my db that should be the same except for columns(I copied one table from the other). In each I have a "default" entry as the first record in the table just to prevent my select queries from erroring out if they don't find a match for the criteria. When I use the following statement,
Code:SQL="SELECT ID, Name, Picture FROM background WHERE Name ='" & Fname & "' OR Name='Default'"
it returns the default value as the record, not the match for "Name", even though there is one(when I remove the OR Name='Default' it pulls the record).
When I use this query for the other table from the same .asp page,
Code:SQL="SELECT ID, Date_Time, URL, Icon, Title, Description, Status FROM Submission WHERE Technician ='" & Fname & "' OR Technician='Default'"
it returns the record where "Technician" matches even though it is below "default" in the table.
I want the query to return the "default" record only if there is NO match for the first criteria, which it does in the second case, but not the first. Is there some way to force this? Thanks in advance for any assistance provided! -Chris Gordon
View 4 Replies
View Related
Sep 15, 2006
This is I think a very simple query.
with a number of forms/ queries etc open and you click on at the back it is not coming to the front for amendment.
It is probably an indicator somewhere but I just can't find it
any help appreciated
Ta
humph
View 3 Replies
View Related
Nov 6, 2006
Hello,
I have split a database useing the database spliter wizard. But I still have network speed problems. What I am wondering is if anyone knows if useing an ODBC connection between the front and back ends is more efficient than file sharing across the network?
Thanks for any information on this
Tim
View 4 Replies
View Related
Aug 15, 2006
Thanks if anyone can offer a suggestion, I cannot find a similar problem described on the forum.
I have a form which runs at startup maximised. Pop-up and Modal are set to 'NO', Auto Resize and Center are also set to 'NO', Border style has been set to various settings, and Moveable has also been tried at 'YES' and 'NO'.
A command button on this form opens another form with the same settings which I want to take the original form's 'place' in the application window.
This all works fine, just that when I close the second window (using DoCmd.Close), the original window is then no longer maximised underneath it. I want to make sure certain windows are maximised at all times.
I know I could hack this with a DoCmd.Maximise somewhere, (or by switiching to full Pop-up/Modal mode and hiding the Application window) but the results of these are all a bit of a hack.
Can anyone shed light on the mysteries of Access's default form maximisation behaviour?
Or does anyone do what I have described successfully?
View 4 Replies
View Related
Sep 6, 2012
I have an Inventory DB Table called [EngData] that has a subform table called [Inventory]. I have in the subform a calculated text box that Sums three columns, StockQtyMade, StockQtySold and StockQtyShrink. This works perfectly.
On the Main form I have a calculated text box that references the subform calculated field. This also displays correct info.
On another Form I wanted other users to see the total stock on hand by using a calculated field called PullTotalQty. This is set by using DSum(...). The only problem is that the DSum(...) keeps giving totals that are not accurate. Sometimes the quantity is a few pieces less then the correct amount and in other cases the qty is many times what it should be.
Whatever the amount in error it is consistent each time a particular record is displayed. I have tried many things to get this to work but nothing has fixed the issue. I have also tried changing the query and nothing works. Changing the query and using the [Inventory] table in the DSum domain gives a different wrong quantity.
Here is the code: I reduced the code down to one column to be summed (StockQtyMade) just to see if I could get that working first. I will add the other two columns later. for testing purposes I am only looking at the StockQtyMade amounts.
Me.PullTotalQty.Value = DSum("[tblInventory subform].[Form].[StockQtyMade]", "[SumStockQuery]", "[tblInventory subform].[Form].[PartID]= " & Me.[ID])
Here is the SumStockQuery SQL:
SELECT Inventory.TransactionID, Inventory.PartID, Inventory.PrintNo, Inventory.StockRev, Inventory.StockQtySold, Inventory.StockQtyMade, Inventory.StockQtyShrink, Inventory.StockQtyXIncomplete, Inventory.StockLoc, Inventory.TransactionDescription
FROM Inventory
WHERE (((Inventory.TransactionDescription)<>"xNextOP"))
ORDER BY Inventory.TransactionID DESC;
Why the totals are incorrect??
View 3 Replies
View Related
Mar 20, 2005
I have records which represent tasks and the tasks need to be scheduled. They can be ordered to some degree by sorting the table on specific fields and then by sorting parts of the table by specific fields, however, the final ordering needs to be done manually as it cannot be done by a field sort. So, how can you move records around manually? It would be like a CUT and PASTE INSERT. Thanks.... Lester
View 3 Replies
View Related
Mar 22, 2007
Hi,
I apologise if this has been posted in the wrong place.
I am currently making changes to a VB front end for a database of jobs in our company. we have approx 2000 job records in the job table. The program uses a recordset to move sequentially up or down the table, record by record as it searches.
The code is doing its job fine, but for some reason or another, the records in the database are not in order. They loosely follow the order you would expect from 1 to 2000, but every now and then deviates. Obviously, when pulling data out one record at a time, this gives the data in the wrong order.
I did not design the database. There was orignally no primary key or indexing. The new job number (an obvious choice for a primary key) is generated by the exectuable program.
I have spent hours trying to apply sorts in different ways, and reading about how records are stored, and my limited understanding has led me to believe that merely sorting records in access is not enough to change the order that they are physically stored in.
My coding abillity is not good enough code round this problem, and the ideal fix would be to find out some way of forcing an ordering from now on (ie would making job number and indexed primary key now prevent this happening to future records) and to find some way of re ordering the previous records (not just sorting them to be viewed in order).
Am I being really silly and missing something or is this a problem people have had before?
Thanks in advance,
Jamie
View 2 Replies
View Related
Apr 21, 2005
I have and order entry/lookup form with a subform to view the line items on the order.
Once an order has been saved and status is ‘placed’ I want the records for that order to be locked.
I would also like to display a message box with a yes/no answer to confirm that they want to issue the order and if they confirm then lock the record otherwise return them to the open order.
I can't find out how to do this, but I'm sure it can be done.
Any help will be gratefully accepted.
View 3 Replies
View Related
Oct 20, 2004
Hi,
I just made a form for order entry which has a subform with order details where each line is a product number with quantity, extended price, etc...
The problem is that when I add a product in the subform, I add it in the new record which is at the bottom of the form. I can add many product like that it works no problem , just adding them to the bottom of the list.
But, when I close the main form and reopen it, the records are now liste is the opposite direction, meaning that the last product i added is now the first row of the subform...So the subform is now populated backwards with the latest record being the first one...
What can I do for the subform to always list the products in the same order I originally input them?....
Thanks,
Hugues
View 2 Replies
View Related
Jun 23, 2006
hi i have a button that loads a report. If i then close the report the form, which is set with no border/no max/min/close/non movable and opens maximised, places itself off centre. I want it to stay maximised full screen. The only work around i currently have is when the use moves the mouse over the form it maximises itself. Will this then be calling this function everytime the mouse moves(cant be very efficient). is there a better way to maximise the form Immediately after closing the report.
View 5 Replies
View Related
Nov 9, 2014
I am trying to make a dsum for products coming in and coming out. find the example below
Products In
Apple 10
Mango 5
Products out
Apple 5
Now I want to show statement for sum as follows
Product. In. Out. Net in hand
Apple. 10. 5. 5
Mango. 5. 0. 5
But it is showing only
Product. In. Out. Net in hand
Apple. 10. 5. 5
what I understand is dsum cannot find the out field for mango as there is no field found for mango
View 14 Replies
View Related
Feb 22, 2014
I currently have a button with a checkbox on top (z-axis wise). This works exactly like I want, except that whenever the button is clicked or focused, it gets brought to the top and hides the checkbox. The only idea I've been able to come up with is maybe making the button completely transparent, with an image of a button behind it.
View 1 Replies
View Related
Mar 20, 2015
But in my access database I have a SQL code in which excel sheet opens automatically with required data. Now problem is one column in the excel sheet since this morning is showing up in Chinese instead of English. I don't know what to do.
View 1 Replies
View Related
Mar 24, 2015
I have recently split my DB and distributed the front ends to respective users. I dont know why for this particular user, the property sheet does not show up even though the the Property sheet button is clicked on the Ribbon bar. For others it seems all fine. This user runs on 2 monitors , but that should not be a problem I guess?
I am currently running 2010 version , and i have tried doing run>msaccess/safe which does not work.
How the user can customize reports or queries , or I can modify designs if I want to on his front end...
View 3 Replies
View Related