Please Help Urgent help needed!!!! 
Author Message
 Please Help Urgent help needed!!!!

Hi guys

I have been creating this application using VB and Access 2000
now after some time and when i thought the application is coming to its end
i find a BIG problem....

i have been adding records to a table and when i do it, i usually calculate
the values of this  new record using the previous records...so i use
Moveprevious and such things to calculate the new values....

But now i think my whole application is going to crash....because from last
tzo days the program has been inserting the new records just anywhere in the
middle instead of in the end of the table....Is there a specific thing i
have to do to make the new added recorded always be added in the end of the
table or as the last record....

Please guys help and looking for some positive reply at the earliest

Cheers
manoj



Mon, 19 Apr 2004 18:41:01 GMT  
 Please Help Urgent help needed!!!!
Manoj,

My first reaction is that the order in which the data is viewed/returned to
your recordset will be determined by the indexes/sorting/keys which are
setup in the tables or which are set up in the statements to retreive the
data.

My expectation would be that the record is added at the end and then the
next time you look at a table it may be in the middle because, for example,
your primary key is last name and set to be sorted in ascending order.

As one solution which (I think) is independant of the reason why this is
happening, use a piece of data to determine which records are "earlier" than
the one being added, set a filter on the recordset to restrict the data to
that, iterate over the filtered data to do your calculations, then remove
the filter.  There are several other ways to do the calculations, the key is
using a piece of data to determine "previous" records.

If no such logical piece of data exists, add a "record creation date/time"
field.  You could also use an autonumber field but this could be dangerous
depending on the specifics of your application (replication, number of
records, etc...)

John

Quote:
> Hi guys

> I have been creating this application using VB and Access 2000
> now after some time and when i thought the application is coming to its
end
> i find a BIG problem....

> i have been adding records to a table and when i do it, i usually
calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

> But now i think my whole application is going to crash....because from
last
> tzo days the program has been inserting the new records just anywhere in
the
> middle instead of in the end of the table....Is there a specific thing i
> have to do to make the new added recorded always be added in the end of
the
> table or as the last record....

> Please guys help and looking for some positive reply at the earliest

> Cheers
> manoj



Tue, 20 Apr 2004 02:37:54 GMT  
 Please Help Urgent help needed!!!!
Records in Access tables have no inherent order; that is, there is no record
number or physical order to records at all.  New records may, in fact, be
added anywhere in the access mdb.  You set the order of your recordset by
the "ORDER BY" clause of your SQL statement.


Quote:
> Hi guys

> I have been creating this application using VB and Access 2000
> now after some time and when i thought the application is coming to its
end
> i find a BIG problem....

> i have been adding records to a table and when i do it, i usually
calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

> But now i think my whole application is going to crash....because from
last
> tzo days the program has been inserting the new records just anywhere in
the
> middle instead of in the end of the table....Is there a specific thing i
> have to do to make the new added recorded always be added in the end of
the
> table or as the last record....

> Please guys help and looking for some positive reply at the earliest

> Cheers
> manoj



Mon, 26 Apr 2004 09:09:44 GMT  
 Please Help Urgent help needed!!!!

Quote:

> i have been adding records to a table and when i do it, i usually calculate
> the values of this  new record using the previous records...so i use
> Moveprevious and such things to calculate the new values....

I think the quickest solution is to add an autonumber field and then
before inserting the data, find the biggest value. U can also create
this "autonumbering" by code yourself, but it's a bit tricky (I've
never done it, but I've seen it in a book). Another way it to create a
separate table in which u write the values manually. So when u want to
use them, then just look for the value in the table.

HTH
Hugo



Mon, 26 Apr 2004 23:10:25 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Urgent help needed please help

3. URGENT help needed, please help

4. Urgent help needed please help

5. Urgent help needed please help

6. Newbies need help......Urgent please help!!

7. Urgent Help Help Help please

8. Formula Error...URGENT, HELP HELP HELP... PLEASE

9. Urgent Help Needed with Lookup code...Please!!!

10. I NEED HELP !!!! URGENT PLEASE

11. URGENT HELP PLEASE PLEASE PLEASE???

12. MaskEdit and and form load Please urgent help needed

 

 
Powered by phpBB® Forum Software