473,883 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto-generate recently visited record-list

Hi,

I have a database with 2 main forms. Contacts and companies. I share
the base with two others via LAN. On the companies form I have buttons
to navigate throught the records
(>400). We are mostly handling let say 5 companies. Every time I have
to navigate or choose the find record button to get the right company.

I am looking fo a feature to have listed in a combo list the last 5
visited records ("recently visited records").

I realize that the records visited by the two other persons are also
listed and..., when I revisit a record, there might be two same records
in the list.

Anybody knows how to make that feature?

Bart

Jun 8 '06 #1
6 2751
Use the Current event of the form to add a record to a history table that
logs the records visited. You can then use this table joined to your real
table to limit and sort the RowSource of your combo.

The history table would need these fields:
LogID AutoNumber primary key
FKID Number records the primary key value of the visited
record.

In the Current event of your form, append a record. Either Execute an Append
query statement, or AddNew. It you want to limit it to the top 5, you will
also need to Execute a Delete query to remove the others. Then Requery the
combo so the newly added record shows up.

Use the AfterUpate event of the combo to move to the desired record, using
code like this:
http://allenbrowne.com/ser-03.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
Hi,

I have a database with 2 main forms. Contacts and companies. I share
the base with two others via LAN. On the companies form I have buttons
to navigate throught the records
(>400). We are mostly handling let say 5 companies. Every time I have
to navigate or choose the find record button to get the right company.

I am looking fo a feature to have listed in a combo list the last 5
visited records ("recently visited records").

I realize that the records visited by the two other persons are also
listed and..., when I revisit a record, there might be two same records
in the list.

Anybody knows how to make that feature?

Bart

Jun 8 '06 #2
Thank you for your help.

I sussesfully planted the record search combo box as discribed in your
link.
I got problems with you query solution, mainly because of lack of
knowledge.

I have two forms: contacts and companies
On the company form I added a combo list CompanyName ORDER BY Inserting
Date DESC. Inserting Date is one of the autofilled field autofilled
after I start to insert a new company.
From this combo box I tried to appoach my idea to get the most recent companies on top of the list, however not all companies recently added
("inserting date") are approached again after that.

But, on each form we also have a Notes-field where we add the
progression. Below this field there is a button on that form inserting
the present date on the note:

Private Sub InDate_Click()
If Len(Me.Notes & "") > 0 Then
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & "
------ "
End If
If Len(Me.Notes & "") = 0 Then
Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
End If
Notes.SetFocus
Notes.SelStart = Len(Notes.Value )
End Sub
Sample of Notes contents:
01-05-2006 ------ Send email with brochure
03-05-2006 ------ Management meeting planned

I made a history table as you wrote to me with LogID and FKID.
Now I would like to perform the following:

How to have added the CompanyID after I click on the InDate button.
Because inserting a date in the Notes field (to add new info) means
this record is recently updated and I want to have this added to the
history list.

I have tried with AddNew, RecordSet but it was complicated.

With the added combo box I then can then create a list of companies
from the history table who are recently approached.

Bart.

Allen Browne wrote: Use the Current event of the form to add a record to a history table that
logs the records visited. You can then use this table joined to your real
table to limit and sort the RowSource of your combo.

The history table would need these fields:
LogID AutoNumber primary key
FKID Number records the primary key value of the visited
record.

In the Current event of your form, append a record. Either Execute an Append
query statement, or AddNew. It you want to limit it to the top 5, you will
also need to Execute a Delete query to remove the others. Then Requery the
combo so the newly added record shows up.

Use the AfterUpate event of the combo to move to the desired record, using
code like this:
http://allenbrowne.com/ser-03.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
Hi,

I have a database with 2 main forms. Contacts and companies. I share
the base with two others via LAN. On the companies form I have buttons
to navigate throught the records
(>400). We are mostly handling let say 5 companies. Every time I have
to navigate or choose the find record button to get the right company.

I am looking fo a feature to have listed in a combo list the last 5
visited records ("recently visited records").

I realize that the records visited by the two other persons are also
listed and..., when I revisit a record, there might be two same records
in the list.

Anybody knows how to make that feature?

Bart


Jun 10 '06 #3
You are inserting the date and message into a memo field?

To achieve what you want with any efficiency at all, you need to redesign
this table so that separate notes are added instead of appending to one
note.

The fields will be:
NoteID AutoNumber
CompanyID foreign key to Company.Company ID
NoteDate date/time this note was added.
TheNote Memo the actual comment.
You will now have a subform where the notes are entered.

Regarding the first part of your question, I understand that your Company
table has a primary key (perhaps an Autonumber called CompanyID), and that
you are adding a record to your Log table recording this CompanyID in a
field name FkID (foreign key to Company.Company ID.) After adding a record to
this, you want to reassign the RecordSource of your combo so that it shows
the last 5 companies you visited. Something like this:

strSql = "SELECT DISTINCT TOP 5 Company.Company ID, Company.Company Name
FROM Company INNDER JOIN Log ON Company.Company ID = Log.FkID
ORDER BY Log.LogID DESC, Company.Company ID;"

Me.cboHistory.R owSource = strSql

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...
Thank you for your help.

I sussesfully planted the record search combo box as discribed in your
link.
I got problems with you query solution, mainly because of lack of
knowledge.

I have two forms: contacts and companies
On the company form I added a combo list CompanyName ORDER BY Inserting
Date DESC. Inserting Date is one of the autofilled field autofilled
after I start to insert a new company.
From this combo box I tried to appoach my idea to get the most recent

companies on top of the list, however not all companies recently added
("inserting date") are approached again after that.

But, on each form we also have a Notes-field where we add the
progression. Below this field there is a button on that form inserting
the present date on the note:

Private Sub InDate_Click()
If Len(Me.Notes & "") > 0 Then
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & "
------ "
End If
If Len(Me.Notes & "") = 0 Then
Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
End If
Notes.SetFocus
Notes.SelStart = Len(Notes.Value )
End Sub
Sample of Notes contents:
01-05-2006 ------ Send email with brochure
03-05-2006 ------ Management meeting planned

I made a history table as you wrote to me with LogID and FKID.
Now I would like to perform the following:

How to have added the CompanyID after I click on the InDate button.
Because inserting a date in the Notes field (to add new info) means
this record is recently updated and I want to have this added to the
history list.

I have tried with AddNew, RecordSet but it was complicated.

With the added combo box I then can then create a list of companies
from the history table who are recently approached.

Bart.

Allen Browne wrote:
Use the Current event of the form to add a record to a history table that
logs the records visited. You can then use this table joined to your real
table to limit and sort the RowSource of your combo.

The history table would need these fields:
LogID AutoNumber primary key
FKID Number records the primary key value of the
visited
record.

In the Current event of your form, append a record. Either Execute an
Append
query statement, or AddNew. It you want to limit it to the top 5, you
will
also need to Execute a Delete query to remove the others. Then Requery
the
combo so the newly added record shows up.

Use the AfterUpate event of the combo to move to the desired record,
using
code like this:
http://allenbrowne.com/ser-03.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
> Hi,
>
> I have a database with 2 main forms. Contacts and companies. I share
> the base with two others via LAN. On the companies form I have buttons
> to navigate throught the records
> (>400). We are mostly handling let say 5 companies. Every time I have
> to navigate or choose the find record button to get the right company.
>
> I am looking fo a feature to have listed in a combo list the last 5
> visited records ("recently visited records").
>
> I realize that the records visited by the two other persons are also
> listed and..., when I revisit a record, there might be two same records
> in the list.
>
> Anybody knows how to make that feature?
>
> Bart

Jun 10 '06 #4
Basically, to do the modification step-by-step, I first would like to
know how to perform a add-record. Modifying the Notes table is
something I can do in the future, I am too afraid the database become
"unrecognizable " ;)

1.
I have:
Form Company with CompanyID as primary key and autonummered /
CompanyName / other company related info;
Table History with LogID and FkID

On Form Company I added a button and: What is the add a
companyID-command (from the active record) to have this ID added in the
record FkID from table History?

With the select command as part of the combo-box properties I can make
a list based on the companyID's added by the button I placed on Form
Company.

(The mentioned button also places a date in the Note memo field)

2.
I am aware the combo-box list become bigger and bigger. What is the
command to maximize the list to 5. I think the table has to be
re-ordered by the time to have the latest added CompanyID on top and
the bottom of the list limited to 5 records.

It's a simple solution and it's all not so efficient, but otherwise
it's all complicated as I am not an expert. Thank you.
Bart

Allen Browne wrote:
You are inserting the date and message into a memo field?

To achieve what you want with any efficiency at all, you need to redesign
this table so that separate notes are added instead of appending to one
note.

The fields will be:
NoteID AutoNumber
CompanyID foreign key to Company.Company ID
NoteDate date/time this note was added.
TheNote Memo the actual comment.
You will now have a subform where the notes are entered.

Regarding the first part of your question, I understand that your Company
table has a primary key (perhaps an Autonumber called CompanyID), and that
you are adding a record to your Log table recording this CompanyID in a
field name FkID (foreign key to Company.Company ID.) After adding a record to
this, you want to reassign the RecordSource of your combo so that it shows
the last 5 companies you visited. Something like this:

strSql = "SELECT DISTINCT TOP 5 Company.Company ID, Company.Company Name
FROM Company INNDER JOIN Log ON Company.Company ID = Log.FkID
ORDER BY Log.LogID DESC, Company.Company ID;"

Me.cboHistory.R owSource = strSql

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...
Thank you for your help.

I sussesfully planted the record search combo box as discribed in your
link.
I got problems with you query solution, mainly because of lack of
knowledge.

I have two forms: contacts and companies
On the company form I added a combo list CompanyName ORDER BY Inserting
Date DESC. Inserting Date is one of the autofilled field autofilled
after I start to insert a new company.
From this combo box I tried to appoach my idea to get the most recent

companies on top of the list, however not all companies recently added
("inserting date") are approached again after that.

But, on each form we also have a Notes-field where we add the
progression. Below this field there is a button on that form inserting
the present date on the note:

Private Sub InDate_Click()
If Len(Me.Notes & "") > 0 Then
Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & "
------ "
End If
If Len(Me.Notes & "") = 0 Then
Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
End If
Notes.SetFocus
Notes.SelStart = Len(Notes.Value )
End Sub
Sample of Notes contents:
01-05-2006 ------ Send email with brochure
03-05-2006 ------ Management meeting planned

I made a history table as you wrote to me with LogID and FKID.
Now I would like to perform the following:

How to have added the CompanyID after I click on the InDate button.
Because inserting a date in the Notes field (to add new info) means
this record is recently updated and I want to have this added to the
history list.

I have tried with AddNew, RecordSet but it was complicated.

With the added combo box I then can then create a list of companies
from the history table who are recently approached.

Bart.

Allen Browne wrote:
Use the Current event of the form to add a record to a history table that
logs the records visited. You can then use this table joined to your real
table to limit and sort the RowSource of your combo.

The history table would need these fields:
LogID AutoNumber primary key
FKID Number records the primary key value of the
visited
record.

In the Current event of your form, append a record. Either Execute an
Append
query statement, or AddNew. It you want to limit it to the top 5, you
will
also need to Execute a Delete query to remove the others. Then Requery
the
combo so the newly added record shows up.

Use the AfterUpate event of the combo to move to the desired record,
using
code like this:
http://allenbrowne.com/ser-03.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
> Hi,
>
> I have a database with 2 main forms. Contacts and companies. I share
> the base with two others via LAN. On the companies form I have buttons
> to navigate throught the records
> (>400). We are mostly handling let say 5 companies. Every time I have
> to navigate or choose the find record button to get the right company.
>
> I am looking fo a feature to have listed in a combo list the last 5
> visited records ("recently visited records").
>
> I realize that the records visited by the two other persons are also
> listed and..., when I revisit a record, there might be two same records
> in the list.
>
> Anybody knows how to make that feature?
>
> Bart


Jun 10 '06 #5
You will need to work through the details of how to implement this.

To create the new record in the log table, you need to execute an append
query statement. It will look like:
Dim strSql
strSql = "INSERT INTO ...
dbEngine(0)(0). Execute strSql, dbFailOnError

To get the SQL string, mock up a query using your specific table and some
literal values, and then switch it to SQL View (view menu in query design).

You can put that code into the click event of your button if that's when you
want it inserted.

You have already been given the details of the SQL statement to limit the
combo to 5 records.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@f 6g2000cwb.googl egroups.com...
Basically, to do the modification step-by-step, I first would like to
know how to perform a add-record. Modifying the Notes table is
something I can do in the future, I am too afraid the database become
"unrecognizable " ;)

1.
I have:
Form Company with CompanyID as primary key and autonummered /
CompanyName / other company related info;
Table History with LogID and FkID

On Form Company I added a button and: What is the add a
companyID-command (from the active record) to have this ID added in the
record FkID from table History?

With the select command as part of the combo-box properties I can make
a list based on the companyID's added by the button I placed on Form
Company.

(The mentioned button also places a date in the Note memo field)

2.
I am aware the combo-box list become bigger and bigger. What is the
command to maximize the list to 5. I think the table has to be
re-ordered by the time to have the latest added CompanyID on top and
the bottom of the list limited to 5 records.

It's a simple solution and it's all not so efficient, but otherwise
it's all complicated as I am not an expert. Thank you.
Bart

Allen Browne wrote:
You are inserting the date and message into a memo field?

To achieve what you want with any efficiency at all, you need to redesign
this table so that separate notes are added instead of appending to one
note.

The fields will be:
NoteID AutoNumber
CompanyID foreign key to Company.Company ID
NoteDate date/time this note was added.
TheNote Memo the actual comment.
You will now have a subform where the notes are entered.

Regarding the first part of your question, I understand that your Company
table has a primary key (perhaps an Autonumber called CompanyID), and
that
you are adding a record to your Log table recording this CompanyID in a
field name FkID (foreign key to Company.Company ID.) After adding a record
to
this, you want to reassign the RecordSource of your combo so that it
shows
the last 5 companies you visited. Something like this:

strSql = "SELECT DISTINCT TOP 5 Company.Company ID, Company.Company Name
FROM Company INNDER JOIN Log ON Company.Company ID = Log.FkID
ORDER BY Log.LogID DESC, Company.Company ID;"

Me.cboHistory.R owSource = strSql

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...
> Thank you for your help.
>
> I sussesfully planted the record search combo box as discribed in your
> link.
> I got problems with you query solution, mainly because of lack of
> knowledge.
>
> I have two forms: contacts and companies
> On the company form I added a combo list CompanyName ORDER BY Inserting
> Date DESC. Inserting Date is one of the autofilled field autofilled
> after I start to insert a new company.
>
>>From this combo box I tried to appoach my idea to get the most recent
> companies on top of the list, however not all companies recently added
> ("inserting date") are approached again after that.
>
> But, on each form we also have a Notes-field where we add the
> progression. Below this field there is a button on that form inserting
> the present date on the note:
>
> Private Sub InDate_Click()
> If Len(Me.Notes & "") > 0 Then
> Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & "
> ------ "
> End If
> If Len(Me.Notes & "") = 0 Then
> Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
> End If
> Notes.SetFocus
> Notes.SelStart = Len(Notes.Value )
> End Sub
>
>
> Sample of Notes contents:
> 01-05-2006 ------ Send email with brochure
> 03-05-2006 ------ Management meeting planned
>
> I made a history table as you wrote to me with LogID and FKID.
> Now I would like to perform the following:
>
> How to have added the CompanyID after I click on the InDate button.
> Because inserting a date in the Notes field (to add new info) means
> this record is recently updated and I want to have this added to the
> history list.
>
> I have tried with AddNew, RecordSet but it was complicated.
>
> With the added combo box I then can then create a list of companies
> from the history table who are recently approached.
>
> Bart.
>
> Allen Browne wrote:
>> Use the Current event of the form to add a record to a history table
>> that
>> logs the records visited. You can then use this table joined to your
>> real
>> table to limit and sort the RowSource of your combo.
>>
>> The history table would need these fields:
>> LogID AutoNumber primary key
>> FKID Number records the primary key value of the
>> visited
>> record.
>>
>> In the Current event of your form, append a record. Either Execute an
>> Append
>> query statement, or AddNew. It you want to limit it to the top 5, you
>> will
>> also need to Execute a Delete query to remove the others. Then Requery
>> the
>> combo so the newly added record shows up.
>>
>> Use the AfterUpate event of the combo to move to the desired record,
>> using
>> code like this:
>> http://allenbrowne.com/ser-03.html
>>
>> "AA Arens" <ba***********@ gmail.com> wrote in message
>> news:11******** *************@i 39g2000cwa.goog legroups.com...
>> > Hi,
>> >
>> > I have a database with 2 main forms. Contacts and companies. I share
>> > the base with two others via LAN. On the companies form I have
>> > buttons
>> > to navigate throught the records
>> > (>400). We are mostly handling let say 5 companies. Every time I
>> > have
>> > to navigate or choose the find record button to get the right
>> > company.
>> >
>> > I am looking fo a feature to have listed in a combo list the last 5
>> > visited records ("recently visited records").
>> >
>> > I realize that the records visited by the two other persons are also
>> > listed and..., when I revisit a record, there might be two same
>> > records
>> > in the list.
>> >
>> > Anybody knows how to make that feature?
>> >
>> > Bart

Jun 11 '06 #6
Hi Allen, I have tried a more easier way to get the recentlist, see
http://groups.google.com/group/comp....26e9222568b5df

Thanks for your help.

Bart
Allen Browne wrote:
You will need to work through the details of how to implement this.

To create the new record in the log table, you need to execute an append
query statement. It will look like:
Dim strSql
strSql = "INSERT INTO ...
dbEngine(0)(0). Execute strSql, dbFailOnError

To get the SQL string, mock up a query using your specific table and some
literal values, and then switch it to SQL View (view menu in query design).

You can put that code into the click event of your button if that's when you
want it inserted.

You have already been given the details of the SQL statement to limit the
combo to 5 records.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@f 6g2000cwb.googl egroups.com...
Basically, to do the modification step-by-step, I first would like to
know how to perform a add-record. Modifying the Notes table is
something I can do in the future, I am too afraid the database become
"unrecognizable " ;)

1.
I have:
Form Company with CompanyID as primary key and autonummered /
CompanyName / other company related info;
Table History with LogID and FkID

On Form Company I added a button and: What is the add a
companyID-command (from the active record) to have this ID added in the
record FkID from table History?

With the select command as part of the combo-box properties I can make
a list based on the companyID's added by the button I placed on Form
Company.

(The mentioned button also places a date in the Note memo field)

2.
I am aware the combo-box list become bigger and bigger. What is the
command to maximize the list to 5. I think the table has to be
re-ordered by the time to have the latest added CompanyID on top and
the bottom of the list limited to 5 records.

It's a simple solution and it's all not so efficient, but otherwise
it's all complicated as I am not an expert. Thank you.
Bart

Allen Browne wrote:
You are inserting the date and message into a memo field?

To achieve what you want with any efficiency at all, you need to redesign
this table so that separate notes are added instead of appending to one
note.

The fields will be:
NoteID AutoNumber
CompanyID foreign key to Company.Company ID
NoteDate date/time this note was added.
TheNote Memo the actual comment.
You will now have a subform where the notes are entered.

Regarding the first part of your question, I understand that your Company
table has a primary key (perhaps an Autonumber called CompanyID), and
that
you are adding a record to your Log table recording this CompanyID in a
field name FkID (foreign key to Company.Company ID.) After adding a record
to
this, you want to reassign the RecordSource of your combo so that it
shows
the last 5 companies you visited. Something like this:

strSql = "SELECT DISTINCT TOP 5 Company.Company ID, Company.Company Name
FROM Company INNDER JOIN Log ON Company.Company ID = Log.FkID
ORDER BY Log.LogID DESC, Company.Company ID;"

Me.cboHistory.R owSource = strSql

"AA Arens" <ba***********@ gmail.com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com...
> Thank you for your help.
>
> I sussesfully planted the record search combo box as discribed in your
> link.
> I got problems with you query solution, mainly because of lack of
> knowledge.
>
> I have two forms: contacts and companies
> On the company form I added a combo list CompanyName ORDER BY Inserting
> Date DESC. Inserting Date is one of the autofilled field autofilled
> after I start to insert a new company.
>
>>From this combo box I tried to appoach my idea to get the most recent
> companies on top of the list, however not all companies recently added
> ("inserting date") are approached again after that.
>
> But, on each form we also have a Notes-field where we add the
> progression. Below this field there is a button on that form inserting
> the present date on the note:
>
> Private Sub InDate_Click()
> If Len(Me.Notes & "") > 0 Then
> Me.Notes = Me.Notes & vbCrLf & Format(Date, "dd-mm-yyyy") & "
> ------ "
> End If
> If Len(Me.Notes & "") = 0 Then
> Me.Notes = Me.Notes & Format(Date, "dd-mm-yyyy") & " ------ "
> End If
> Notes.SetFocus
> Notes.SelStart = Len(Notes.Value )
> End Sub
>
>
> Sample of Notes contents:
> 01-05-2006 ------ Send email with brochure
> 03-05-2006 ------ Management meeting planned
>
> I made a history table as you wrote to me with LogID and FKID.
> Now I would like to perform the following:
>
> How to have added the CompanyID after I click on the InDate button.
> Because inserting a date in the Notes field (to add new info) means
> this record is recently updated and I want to have this added to the
> history list.
>
> I have tried with AddNew, RecordSet but it was complicated.
>
> With the added combo box I then can then create a list of companies
> from the history table who are recently approached.
>
> Bart.
>
> Allen Browne wrote:
>> Use the Current event of the form to add a record to a history table
>> that
>> logs the records visited. You can then use this table joined to your
>> real
>> table to limit and sort the RowSource of your combo.
>>
>> The history table would need these fields:
>> LogID AutoNumber primary key
>> FKID Number records the primary key value of the
>> visited
>> record.
>>
>> In the Current event of your form, append a record. Either Execute an
>> Append
>> query statement, or AddNew. It you want to limit it to the top 5, you
>> will
>> also need to Execute a Delete query to remove the others. Then Requery
>> the
>> combo so the newly added record shows up.
>>
>> Use the AfterUpate event of the combo to move to the desired record,
>> using
>> code like this:
>> http://allenbrowne.com/ser-03.html
>>
>> "AA Arens" <ba***********@ gmail.com> wrote in message
>> news:11******** *************@i 39g2000cwa.goog legroups.com...
>> > Hi,
>> >
>> > I have a database with 2 main forms. Contacts and companies. I share
>> > the base with two others via LAN. On the companies form I have
>> > buttons
>> > to navigate throught the records
>> > (>400). We are mostly handling let say 5 companies. Every time I
>> > have
>> > to navigate or choose the find record button to get the right
>> > company.
>> >
>> > I am looking fo a feature to have listed in a combo list the last 5
>> > visited records ("recently visited records").
>> >
>> > I realize that the records visited by the two other persons are also
>> > listed and..., when I revisit a record, there might be two same
>> > records
>> > in the list.
>> >
>> > Anybody knows how to make that feature?
>> >
>> > Bart


Jun 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2614
by: Manlio Perillo | last post by:
Hi. This post follows "does python have useless destructors". I'm not an expert, so I hope what I will write is meaningfull and clear. Actually in Python there is no possibility to write code that follows C++ RAII pattern. Of course Python objects are not statics like in C++, but in C++ the auto_ptr class is used for enforcing this pattern for dynamical
1
34326
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like the page to auto-refresh every 4 seconds....if the user un-checks the checkbox, I'd like to turn off the auto refresh. The page is as follows:
1
13965
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the page the way I want. Does anybody know a solution for this? First of all, the code I am using: CSS ------- body {
2
12724
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error telling me that "Number of query values and destination fields are not the same." If I add a value for the auto increment field to the SQL String the data is entered into the table with no problems but obviously the auto increment field now...
9
2524
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the auto-newline "minor mode" facility. If you could spare a little time, would you answer these questions, please: o Do you program with auto-newline switched on (e.g. do you get NLs inserted automatically after typing a `;' or `{')? o Did you configure...
20
2887
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
5
3290
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if I change 'auto' to 0 for left and right margin values; I have to leave those at 'auto'.. so I would like to know what exactly means 'auto' -- what value it represents exactly (and does it apply for all elements/values you might apply 'auto' to?)
22
3103
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly like that: int main(char argc, char *argv, char *env) { try { auto Exception mainException(1); mainException.setErrNo(42);
2
3083
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value ("auto") in JavaScript - however instead of getting "auto" value, I get calculated height. In IE and Opera it simply returns "auto". Any ideas how to check in Firefox if element height was set to "auto" ? I'll be grateful for any help.
21
6375
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
9933
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
11114
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10835
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10407
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4205
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.