Access Form showing data in wrong order after update

Hi,
I am new to Access.

I have a simple database and a form connected to that database. I have made 
simple buttons on the form to add or delete records. The trouble is that 
after I add or delete a record using the form, the records are displayed on 
the form in wrong order! For instance the last 2 records are displayed first.

Please Help!
0
Utf
3/13/2008 5:49:02 PM
access 16762 articles. 3 followers. Follow

8 Replies
1134 Views

Similar Articles

[PageSpeed] 16

"Himmahan" <Himmahan@discussions.microsoft.com> wrote in message 
news:EE60CA92-7654-4994-A5DA-18070E063CEE@microsoft.com...
> Hi,
> I am new to Access.
>
> I have a simple database and a form connected to that database. I have 
> made
> simple buttons on the form to add or delete records. The trouble is 
> that
> after I add or delete a record using the form, the records are 
> displayed on
> the form in wrong order! For instance the last 2 records are displayed 
> first.
>
> Please Help!

The order records are displayed in a form is usually based upon the sort 
order in the underlying table.  Tables are usually sorted by the primary 
key field.  If you wish to show the records in a different order in the 
when you view them through the form, you can always sort the records in 
the form.  Click in the field on the form you wish to sort by and click 
the Sort Ascending (A to Z) or Sort Descending (Z to A) button on the 
toolbar.  You can also use the Records | Sort menu command.

I hope this helps.
Julie 


0
JulieS
3/13/2008 6:37:22 PM
On Thu, 13 Mar 2008 10:49:02 -0700, Himmahan
<Himmahan@discussions.microsoft.com> wrote:

>Hi,
>I am new to Access.
>
>I have a simple database and a form connected to that database. I have made 
>simple buttons on the form to add or delete records. The trouble is that 
>after I add or delete a record using the form, the records are displayed on 
>the form in wrong order! For instance the last 2 records are displayed first.
>
>Please Help!

A Table HAS NO order. If you want to see records in some particular order, you
must - no options! - include a field in the table which defines the order, and
either base your form on a Query sorting the records by that field; or setting
the Form's OrderBy property to that field.
-- 

             John W. Vinson [MVP]
0
John
3/13/2008 7:52:09 PM
Base your form on a query of the source table. Sort the query by whatever 
field you wish.

"Himmahan" wrote:

> Hi,
> I am new to Access.
> 
> I have a simple database and a form connected to that database. I have made 
> simple buttons on the form to add or delete records. The trouble is that 
> after I add or delete a record using the form, the records are displayed on 
> the form in wrong order! For instance the last 2 records are displayed first.
> 
> Please Help!
0
Utf
3/13/2008 7:58:03 PM
"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
news:mc1jt3leosq8ce5aj7p10b0ahb2dksbbro@4ax.com...
<snip>
>
> A Table HAS NO order. If you want to see records in some particular 
> order, you
> must - no options! - include a field in the table which defines the 
> order, and
> either base your form on a Query sorting the records by that field; or 
> setting
> the Form's OrderBy property to that field.
> -- 
>
>             John W. Vinson [MVP]

John,
I'm quite new to Access so I'm a bit puzzled by your comment. I 
understand the order that records in a table is presented is irrelevant 
and attempting to find a record by its record number is meaningless, but 
in both table and form properties I see the Order By property.  Can you 
point me to some information explaining further?

Thank you,
Julie 


0
JulieS
3/13/2008 8:18:51 PM
On Thu, 13 Mar 2008 16:18:51 -0400, "JulieS"
<JulieS@discussions.microsoft.com> wrote:

>John,
>I'm quite new to Access so I'm a bit puzzled by your comment. I 
>understand the order that records in a table is presented is irrelevant 
>and attempting to find a record by its record number is meaningless, but 
>in both table and form properties I see the Order By property.  Can you 
>point me to some information explaining further?

The OrderBy property simply is a way of creating a concealed Query, which
sorts the records in order. The table datasheet is *presented* in primary key
order, or in its OrderBy order if there is one, as a convenience; but this has
no bearing on the actual disk storage order. New records will be stored
wherever Access finds convenient, and the records will be displayed in
whatever order Access finds convenient, unless you specify the sort order
somewhere.

You could have a Table with one sort specified in its order by property, a
Form with a different order by, and a Report with yet a third sort order
specified in its Sorting and Grouping property. They'd all be independent.
-- 

             John W. Vinson [MVP]
0
John
3/13/2008 8:49:32 PM
"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
news:2m4jt3ttktab74q9s28ler7vo4t531ltk3@4ax.com...
> On Thu, 13 Mar 2008 16:18:51 -0400, "JulieS"
> <JulieS@discussions.microsoft.com> wrote:
>
>>John,
>>I'm quite new to Access so I'm a bit puzzled by your comment. I
>>understand the order that records in a table is presented is 
>>irrelevant
>>and attempting to find a record by its record number is meaningless, 
>>but
>>in both table and form properties I see the Order By property.  Can 
>>you
>>point me to some information explaining further?
>
> The OrderBy property simply is a way of creating a concealed Query, 
> which
> sorts the records in order. The table datasheet is *presented* in 
> primary key
> order, or in its OrderBy order if there is one, as a convenience; but 
> this has
> no bearing on the actual disk storage order. New records will be 
> stored
> wherever Access finds convenient, and the records will be displayed in
> whatever order Access finds convenient, unless you specify the sort 
> order
> somewhere.
>
> You could have a Table with one sort specified in its order by 
> property, a
> Form with a different order by, and a Report with yet a third sort 
> order
> specified in its Sorting and Grouping property. They'd all be 
> independent.
> -- 
>
>             John W. Vinson [MVP]

Thank you for the information John.  I appreciate it.
Julie 


0
JulieS
3/13/2008 10:13:44 PM
Julie:

Its interesting to note that queries also have an OrderBy property.  This 
seems quite bizarre to me at least, as the result table of a query is 
generally sorted by an ORDER BY clause in the underlying SQL statement; this 
is the equivalent of the 'sort' row in the grid in query design view.  
Consequently a query can have conflicting sort orders, one by virtue of its 
ORDER BY clause, the other by virtue of its OrderBy property.  If you create 
a query and sort it by one column, either in the design grid or in SQL view, 
then open the query in datasheet view and sort it on another column by 
clicking on the A-Z button on the toolbar, which sets its OrderBy property, 
and then save the query, when your open it again the OrderBy property will 
govern the order of the result table, not its ORDER BY clause.  While I can 
understand the mechanics of this, in essence a sorted query is being 
re-sorted, any good reason for having an OrderBy property for a query at all 
escapes me!

BTW if you are using a query as the RecordSource of a report don't sort the 
query; the report will generally (though not invariably as is sometimes said) 
ignore the sort order.  Use the reports internal sorting and grouping 
mechanism instead.  Forms on the other hand do respect a query's sort order.

Ken Sheridan
Stafford, England 

"JulieS" wrote:

> 
> "John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
> news:mc1jt3leosq8ce5aj7p10b0ahb2dksbbro@4ax.com...
> <snip>
> >
> > A Table HAS NO order. If you want to see records in some particular 
> > order, you
> > must - no options! - include a field in the table which defines the 
> > order, and
> > either base your form on a Query sorting the records by that field; or 
> > setting
> > the Form's OrderBy property to that field.
> > -- 
> >
> >             John W. Vinson [MVP]
> 
> John,
> I'm quite new to Access so I'm a bit puzzled by your comment. I 
> understand the order that records in a table is presented is irrelevant 
> and attempting to find a record by its record number is meaningless, but 
> in both table and form properties I see the Order By property.  Can you 
> point me to some information explaining further?
> 
> Thank you,
> Julie 
> 
> 
>

0
Utf
3/13/2008 11:48:01 PM
"Ken Sheridan" <KenSheridan@discussions.microsoft.com> wrote in message 
news:9C7BA935-A2ED-464E-87F4-9EA47C39A225@microsoft.com...
> Julie:
>
> Its interesting to note that queries also have an OrderBy property. 
> This
> seems quite bizarre to me at least, as the result table of a query is
> generally sorted by an ORDER BY clause in the underlying SQL 
> statement; this
> is the equivalent of the 'sort' row in the grid in query design view.
> Consequently a query can have conflicting sort orders, one by virtue 
> of its
> ORDER BY clause, the other by virtue of its OrderBy property.  If you 
> create
> a query and sort it by one column, either in the design grid or in SQL 
> view,
> then open the query in datasheet view and sort it on another column by
> clicking on the A-Z button on the toolbar, which sets its OrderBy 
> property,
> and then save the query, when your open it again the OrderBy property 
> will
> govern the order of the result table, not its ORDER BY clause.  While 
> I can
> understand the mechanics of this, in essence a sorted query is being
> re-sorted, any good reason for having an OrderBy property for a query 
> at all
> escapes me!
>
> BTW if you are using a query as the RecordSource of a report don't 
> sort the
> query; the report will generally (though not invariably as is 
> sometimes said)
> ignore the sort order.  Use the reports internal sorting and grouping
> mechanism instead.  Forms on the other hand do respect a query's sort 
> order.
>
> Ken Sheridan
> Stafford, England
<snip>

Ken,
Thanks so much for your valuable comments as well.  It's clear to me 
that I can spend an inordinate amount of time reading the posts here as 
well as the wealth of information on websites and still have volumes to 
discover.

Julie



0
JulieS
3/14/2008 12:43:09 AM
Reply:

Similar Artilces:

Sequentially numbered Purchase orders
In the past with Office 97. I used a purchase order template that would basically self number itself. when it opened a small box would appear and by clicking it the PO received a unique number. How can I accomplish this using Office XP. ...

how to show the rectangle box position
i have one rectangle box on a sheet. whenever i move the rectangle box to left or right or top or bottom i would like to show the position of the rectangle box in cell("a1") how can i write some code to show that? ...

windows update 04-15-10
I am running windows vista on a MAC computer with VMWare Fusion. I cannot get the service pack 1 or internet explorer 8 update to run. i get error code 490 and 800704090 Too late now! Support for Vista Gold (no Service Packs) ended on Tuesday, 13 April 2010! Computers running Vista Gold "will no longer receive software updates from Windows Update" until SP1 has been manually installed (which will require several Prerequisite Updates to be installed first). See http://windowsteamblog.com/blogs/windowsvista/archive/2010/04/13/end-of-support-for-windows-vista-with-no...

Passing data from one form to another
Hello I have a form called frmMaindB and it has 5 text boxes on it (txtEmployeeTime, txtDTRegular, txtDTReason1, txtDTReason2, txtDTMaintenance) when I double click on the text box it opens up a pop up form named frm_DecimalConversion. On this form I have two text boxes one box I enter data into and the other calculates or converts the data to a decimal. The box that converts the data is called txtDecimal. Then I have a close button which I want to use to close the pop up form and insert the data into the text box I double clicked in to get the pop up or (frm_DecimalConversion). I have r...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

OWA Password page not showing up.
I installed the hotfix from kb 833734. I've also tried to follow the steps found at kb 327843. However, when I set an account to "change password at next logon" and go to that account in OWA on a FE that's using forms based auth, it doesn't redirect to the page for changing an expired password. However if i direct my browser to that page manually and fill in the form, it unexpires my password just fine. Is this how it's supposed to work? Shouldn't it detect that it's expired and thus redirect me to the page for resetting my password? Thanks. This ...

Getting an Error when there is nothing to show
-- The bottom of my report which is a statement shows #Error when there is no Invoices to add up. Can I have it blank instead. this my text Box Control Source thanks for any Help....Bob =Reports!rptOwnerPaymentMethod!subChildOwnerInvoiceAmount!tbAmount.Value Try: =IIf([subChildOwnerInvoiceAmount].[HasData], [subChildOwnerInvoiceAmount].[tbAmount]) Explanation in: Bring the total from a subreport onto a main report at: http://allenbrowne.com/casu-18.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.h...

making an equation in access
Hi, I would like to create a field that works out a formula based on other fields. i.e field z=field4, when field 1<field 2 - field 3 etc. Yes, it may be a silly question but I am only new to this....Thanks, Dani. Dani, recommend against creating a "field" in a table and storing this value. One of the generally accepted rules of relational database development is not to store a "computed" (any value that is based on the value of other fields in your database) value in the table. It is a waste of database space, and will eventually result in bad data (...

Is this a correct way of doing an optimistic update
Imagine two different users executing this code at the same time. I can not use the CRecordset Update Delete methods for this. // Check to see if version number has been incremented since this view read in // the client data CClientRecordSet rs(mConn); rs.m_strFilter = "ID = "; rs.m_strFilter += client->GetKey(); rs.m_strFilter +=" AND "; rs.m_strFilter += "Version = "; rs.m_strFilter += client->GetVersion(); // Assuming here, this is acting as a lock on tables referenced mConn->BeginTrans(); rs.Open(CRecordset::snapshot, NULL, CRecordset::re...

Help ! formatting data to text
I am creating data in an Excel spreadsheet. I then want to get that data into a simple text email. I have some problems and questions... 1) how do I get the columns of data to line up evenly when I copy the data to email text ? Keep in mind I need to be in simple text format, not HTML or rich text. Every time I do this, all columns become chaos and are unreadable. 2) Is there a simple way to automate the creation of an email from an excel file ? this is less important to me. Thanks in advance WxMachine #1. I think it may have to do with what email client you use, too. I copy and ...

How can I stop charts from refreshing when changing source data?
My problem is, that I am working with a lot of data and when I change some of the ranges all charts in my view refreshes and it takes much time. My pc is aP4 3GHz, 2GB RAM so that should not be the bottleneck. Is there any way to force the charts not to update all the time? ...

form and query problem. please help.
All tables are linked with weak entities. However, when i enter data on the form I can't get it to let me enter more than one partipicant without access generating a new invoice id. however i need one invoice to many participants. It wont work and i have no idea what to do at this point. in addition the workshop will not let me add workshop to invoice. this is a small mdb and i'd like to email it to anyone who can assist me with the relationships as I think this is the problem but I don't know what to do. please help me. INVOICE invoiceNO - autonumber invoice prices WORKSHOP wo...

how do I remove fx from the function line, can't enter data
I have the fx displayed just under my toolbar, and I can't enter or change data in any of the cells in the file. I can't get the red X, the Green check mark, or the black = sign to appear. There are very few areas that are not "greyed out" under the headings at the top. This situation applies to all of the excel files on this computer. I have Excel 2000. Please help. Can you move the cursor around anywhere in the spreadsheet? "dmdranch" wrote: > I have the fx displayed just under my toolbar, and I can't enter or change > data in any of the c...

host unreachable after recent Windows Update
Exchange 5.5 on Windows 2000 Server, fully patched and running real swell until Wednesday morning. (Tuesday evening: applied the GDI+ patch: MS04-028.) Didn't find out until later today: internal e-mail is fine, inbound Internet e-mail is fine, but nothing goes out over the IMC. Each outbound e-mail generates Event ID 3010 warning message in the App log: host unreachable. But NSLOOKUP on that very server successfully resolve those same domain names, and ping gets replies. The only other software on this server: GroupShield 5.0 all up-to-date, and VirusScan 8.0.0 patch 1 push...

Consolidate not updating properly using vba
Hello, I create a code (below) using the macro recorder to refresh the data connection and consolidate the sales figures. My problem is that the code only seems to refresh the data connection, but the data is not consolidating correctly. Now if I go to Data -> Consolidate manually it works fine. How can I have my code work correctly that will consolidate properly. I made sure that I clear the contents before doing the consolidation. Can anyone help me. Thank you in advance. Cheers 'Refresh sales connection ActiveWorkbook.Connections("Query from SalesByDepartment")...

Updating Related Entities Via Workflow
I'm a complete newbie to workflows, so your help is much appreciated. In general my question is, can a parent entity be updated via workflow rules when some event occurs on a related child entity, or does this need to happen via assembly or callout? Specifically... I have a situation where leads come into our system from various places. Because I cannot add leads to a queue, I use a workflow to create a phone call for each lead and add it to a queue. Now, is it possible (through workflow) that when a user accepts the phone call activity from the queue, that the parent lead own...

Using Excel spreadsheet as input to Access
Hello, I posted this in the New Users forum but only got one answer, so thought I'd try here as well. Like so many others, I am an Excel newbie. I was a mainframe COBO programmer in another life, but that was a few years back My manager would like me to write an app that will take tracking dat from an existing Excel spreadsheet (generated by our system) but onl use a select handful of columns as input to a new Access database tha I will create. I'm guessing that I can either a) create a new edited spreadsheet to b used as input to the Access database or b) use the Import wiza...

how do i recover data in publisher
i have been entering addresses to set up a mail merge. i cllicked the "ok" button in the window and lost all data . can i recover it Look in a folder in My Documents named "My Data Sources". Publisher data is saved as .mdb(Access) file. Did you try selecting "Edit Address List" in the Mailings and Catalog menu (Tools)? -- Mary Sauer http://msauer.mvps.org/ "dee" <dee@discussions.microsoft.com> wrote in message news:690430F1-36DE-47EE-8B7D-DD12A096C075@microsoft.com... >i have been entering addresses to set up a mail merge. i cllicked ...

Activities for an Opportunity Order
Is there any way to have activities for an Order in an Opportunity rollup and appear in the Activities/History for the Opportunity? They show up for the related account, but it would be helpful to be able to see these in the related Opportunity. Thanks, -Rick M. On Apr 20, 12:10 pm, Rick M <R...@discussions.microsoft.com> wrote: > Is there any way to have activities for an Order in an Opportunity rollup and > appear in the Activities/History for the Opportunity? They show up for the > related account, but it would be helpful to be able to see these in the > related Opp...

Using subtotals as single data entries
Sorry about the subject--I couldn't figure out how to describe it simply. I have a large file (16,000 records) of amounts billed by roughly 10,000 service providers. A number of these providers have multiple office locations, so each record is unique to a specific office location. In other words, a provider who billed from 3 different office locations will have 3 entries. Each provider has a unique provider ID number, which stays the same regardless of which office location he is billing from. I want to be able to subtotal the amount billed by each provider for all their office locations...

Show only extended description on receipt
I have RMS set up in such a way that it shows the extended description of the items at the POS along with the regular description. When i print a receipt both descriptions print. Is it possible to print only the extended description, if so, how?? Hi Terry, You might downloaded the receipt format or done yourself customization. Just try to find first Entry.Item.ExtendedDescription and if you see another variable called Entry.Description Just remove the row or column with name "Entry.Description" It will work, let me know or send me email address I have already the customized o...

How can I keep track of when (date and time) data is entered into.
I am trying to create a spreadsheet for a high school class. I need to be able to track when a student has entered data into specific cells of the spreadsheet. Any ideas? In the code behind the worksheet, enter (eg) Private Sub Worksheet_Change(ByVal Target As Range) Cells(1, 1).Value = Now() End Sub This will enter in Cell A1 the date and time at which any entry is made in that worksheet. If you need the location of the time-stamp to vary according to which cell is changed then you can test the value of Target and vary the destination cell accordingly. -- Return email address is n...

Pay code update with Integration Manager
I am trying to do a Pay Code update for all employees using Integration Manager using the General Payroll Update. I am able to get the standard Pay Codes to update, but cannot seem to get the "Based On" Pay Codes to update. When I log into GP and view the Employee Maintenance and Go To Pay Codes, I see the standard update. However the Based On Pay Codes remain the old rates unless I select select the Pay Code and simply click Ok. Then the update automatically is brought in. How can I get these updates to take without having to visit each of the Based On Pay Codes and sele...

How can I cut data out of HTML table, into msExcel and just take the data & columns? (but NOT the formatting & URLs!)
Hi This is driving me ABSOLUTELY NUTS! How can I keep the rows & columns of data that I am copying and pasting off a website (my own in this case!), into a spreadsheet... WITHOUT taking all the data formatting? If I paste out of Ms IE v6 into Ms Excel (2003), it does at least keep the columns (something that doesnt happen if I paste out of FireFox, fwiw). But it pastes with all the formatting & URLs etc - which I DONT WANT! OK, I can save as .CSV, close, 2 warnings, and re-open but when done REPEATEDLY this is a damned nuicance! Any suggestions? Ship Shiperton Henethe ship w...

error message in Outlook after running windows and office updates
Hello, I am hoping someone can help me with this. When ever a few staff tries to send a new e-mail, a message "Do you want to save changes" come up and on the back of this message I see the spell checker box come up. The problem is that if you click on "no" on the error message, it comes up with another message something like "running out of memory". I just ran all the windows and office updates on all the machines in the company and so far two employees are having this problem. Is this something to do with the updates? Any suggestions? did you try ...