Open Continuous form with a few lines showing

Hi

I have successfully implemented a continuous form to open at a new
line with
RunCommand acCmdRecordsGoToNew
in the Load Event

However, you have to manually scroll a little to see a few of the
previous records.
It would be nice to see up to 5 of these previous lines on Opening the
form

Is there a way to modify this code to do that?

Thanks
Neil
0
neil40
5/5/2010 12:44:28 AM
access.forms 6864 articles. 2 followers. Follow

7 Replies
784 Views

Similar Articles

[PageSpeed] 9

Change the form's underlying record source to a Top 5 query.

In a query's design view, right click in a blank area, and choose 
properties. Set the Top Values to 5, then adjust your criteria and order by 
clause to return the records you want. Use that query as your form's record 
source.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"neil40" <neil.grantham@googlemail.com> wrote in message 
news:878ebf89-d0be-4316-a99d-586687980884@r11g2000yqa.googlegroups.com...
> Hi
>
> I have successfully implemented a continuous form to open at a new
> line with
> RunCommand acCmdRecordsGoToNew
> in the Load Event
>
> However, you have to manually scroll a little to see a few of the
> previous records.
> It would be nice to see up to 5 of these previous lines on Opening the
> form
>
> Is there a way to modify this code to do that?
>
> Thanks
> Neil 


0
Arvin
5/5/2010 1:16:23 AM
On 5 May, 02:16, "Arvin Meyer [MVP]" <arv...@mvps.invalid> wrote:
> Change the form's underlying record source to a Top 5 query.
>
> In a query's design view, right click in a blank area, and choose
> properties. Set the Top Values to 5, then adjust your criteria and order by
> clause to return the records you want. Use that query as your form's record
> source.
> --
> Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.accessmvp.comhttp://www.mvps.org/access
>
> "neil40" <neil.grant...@googlemail.com> wrote in message
>
> news:878ebf89-d0be-4316-a99d-586687980884@r11g2000yqa.googlegroups.com...
>
>
>
> > Hi
>
> > I have successfully implemented a continuous form to open at a new
> > line with
> > RunCommand acCmdRecordsGoToNew
> > in the Load Event
>
> > However, you have to manually scroll a little to see a few of the
> > previous records.
> > It would be nice to see up to 5 of these previous lines on Opening the
> > form
>
> > Is there a way to modify this code to do that?
>
> > Thanks
> > Neil- Hide quoted text -
>
> - Show quoted text -

I'll give it a try Arvin, but not quite what I want.
I like the whole set of data being available to me in the continuous
form, and wanted the 'new' line to appear with a few 'old' lines
ideally.
I can certainly scroll if necessary, to check where I left off, but if
it could be 'automatic' that would be better.

I presuming that your solution only returns the lst 5 records?

Neil
0
neil40
5/5/2010 9:40:47 AM
This should do the job

Private Sub Form_Load()
  DoCmd.RunCommand acCmdRecordsGoToNew
 For i = 1 To 5
   DoCmd.GoToRecord , , acPrevious
 Next i
End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

0
Linq
5/5/2010 12:22:12 PM
As an afterthought, you might want to check that you have at least 5 record
before executing the 

For i = 1 To 5
   DoCmd.GoToRecord , , acPrevious
Next i

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

0
Linq
5/5/2010 12:25:53 PM
On Wed, 05 May 2010 12:25:53 GMT, "Linq Adams via AccessMonster.com"
<u28780@uwe> wrote:

>As an afterthought, you might want to check that you have at least 5 record
>before executing the 
>
>For i = 1 To 5
>   DoCmd.GoToRecord , , acPrevious
>Next i

Or just trap and ignore the "you cannot go to this record" error.
-- 

             John W. Vinson [MVP]
0
John
5/5/2010 4:45:20 PM
On May 5, 1:22=A0pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
> This should do the job
>
> Private Sub Form_Load()
> =A0 DoCmd.RunCommand acCmdRecordsGoToNew
> =A0For i =3D 1 To 5
> =A0 =A0DoCmd.GoToRecord , , acPrevious
> =A0Next i
> End Sub
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Foru=
ms.aspx/access-forms/201005/1

Linq

Thanks for this, the first line returned an error so I took out the
DoCmd and now it works.
Furthermore, I added another loop to take the cursor back down to the
input line

So it now reads:
Private Sub Form_Load()
  RunCommand acCmdRecordsGoToNew
 For i =3D 1 To 5
   DoCmd.GoToRecord , , acPrevious
 Next i
 For j =3D 1 To 5
   DoCmd.GoToRecord , , acNext
 Next j
End Sub

Perfect!

Neil
0
neil40
5/5/2010 7:15:33 PM
Glad you got it working!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

0
Linq
5/5/2010 7:56:16 PM
Reply:

Similar Artilces:

open dba files
I have Windows 2003 and Palm 1S. Trying to recover Palm archive data in .dba format. Windows won't let me cut or paste file from archive to pda. Can anyone help? Thanks. And your Word question is? "ShirleyD" <ShirleyD@discussions.microsoft.com> wrote in message news:301AF667-A258-49F3-B32C-9715B96B0DBD@microsoft.com... :I have Windows 2003 and Palm 1S. Trying to recover Palm archive data in ..dba : format. Windows won't let me cut or paste file from archive to pda. Can : anyone help? Thanks. ...

Open saved projects automatically?
Hello, i used to be able to double click on my saved projects for Excel, Word, etc, and they would open in their respective application, but for some reason when i do so now the Aplication in question loads up, but doesnt open the saved project i have selected. I then have to go to File, Open. I have tried all the normal routes like right clicking on the project selecting properties and selecting 'opens with' and selecting the correct aplication and always use this, but it still doesnt open. I can also right click, open with and its fine. The strange thing is that if i have a pr...

Check box in Forms Toolbar
How do I make a check box bigger? Rob, Teesside, UK I don't believe it is possible to change the size of the checkbox. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "abfabrob" <abfabrob@discussions.microsoft.com> wrote in message news:AC393618-0FA7-4CFB-9BA2-DEED22793E32@microsoft.com... > How do I make a check box bigger? > > Rob, > Teesside, > UK ...

How to make a hollow line?
Is there some way to make a line shape hollow? That is, make it have a border (like a rectangle shape) with a center that I can change with the fill property? I want to build various structures that connect at odd angles. Lines are perfect because thay can be attached to anything at any angle, but I don't want a solid black line and I don't want a lighter color without a border. I tried using a shape (rectangle or oval) but using the rotate tool to get odd angles is not as convenient as connecting lines. Thanks -- Using Visio Standard 2002 on Win 2000 Draw your rectangle then r...

Showing Owning Business Unit for Accounts in custom view
Recently I stumbled upon a what looked at first glance to be a pretty trivial problem.. Unfortunately this was not the case.. The Account Entity has the (read-only) attribute 'owningbusinessunit' that shows the businessunit the owner of the Account belongs to. All I want to do is show this Business Unit in a custom view. However, MS CRM won't let me add this field as a column, it doesn't show up in the list presented. This is also the case if I want to add it to a form. Previous comments on a similar question pointed out that this attribute can not be changed because it...

Where can I get on-line training for Visio
I am new to Visio and would appreciate some advice on the best way to 'teach myself'. Many thanks try this, http://office.microsoft.com/en-us/results.aspx?Scope=RC&Query=visio al "annmez" <annmez@discussions.microsoft.com> wrote in message news:E051D59E-5DEF-4484-8BC9-EA62847C17A6@microsoft.com... >I am new to Visio and would appreciate some advice on the best way to >'teach > myself'. Many thanks ...

Opening my app from context menu
Hi, I have found out that my problem with opening a file from the context menu is caused by the fact that the main frame is created after the document is loaded (SDI MFC). When the program is opened first and then a file is opened or drag'n'dropped into it, the frame is created first. ...

Display Count of records from subform on Main form
I need to show a count of records for doc on main form. Doc info is on main form and list of pts is on subform. I have entered an unbound text box on the main form and have tried DCount, ABSSum and Count all I get is 0. This is what I have entered: =DCount([ID]) or ABS(Sum([myfrom].[ID]) and =Count([ID]). Thank you in advance for any help you can provide. Thank you. Try it this way: Create a query with the needed table. Add the id-field to the grid. Total it by Count. Save the query and on the form you place an unbound field. In VBA you can do a Dlookup for the one field in the q...

The form required to view this message cannot be displayed. Contact your help ad
I'm trying to open email that contains forwarded email's. I'm using Outlook 2002 w/SP-2 and XP Pro on clean installs. I can save the attachments but would like to just display them if possible. ...

Help!, Adding Custom Forms in CRM
HI Mike, I guess, you have very good exposure to the forms customization in CRM. Could u please help me with this issue. I have a list of products in a seperate database outside CRM. The quantity on hand field in that database is real. Now what I really need is to have a button or toolbar item on the OrderProducts form to Check for availability of the product. I do have the product GUID in the external table. I will have get the currently selected product's guid from orderproduct screen and pass this to a custom aspx page. This custom aspx page will find the available qty and sh...

Showing Holidays?
Hello, My Outlook 2002 calendar is not showing any holidays. It does show my personal reoccurring events. The list of holidays seems to stop in earlier years, so the past few years never have shown holidays on the monthly calendar view. Is there a way to get all of the national holidays to show again? Thanks a lot, Bob http://www.outlook-tips.net/howto/missinghol.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook...

Infopath 2003, MOSS 2007, email form contents
I need to use our SharePoint site to send user support requests via email. So I created a from in InfoPath 2003 with the necessary fields, added a button to submit it to email as an action, and published it to a document library. And it almost does what I want except: 1) I'd like to put the user info (from the text boxes on the form) into the body of the email instead of as an attachment 2) The user has to actually go into the document library and click the New button. I'd rather maybe create a view that just has a button that does the New functionality? Then I can show j...

Search form without allowing edits, deletions or additions
I have a form which has a search combo box attached. I would like this form to be searched only, with no amendments,deletions, additions or otherwise. If I set 'Allow Edits', 'Allow Deletions', 'Allow Additions' and 'Data Entry' to "No" then the combo search does not work. If I 'Allow Edits' it does but then users can adjust the records. Is it possible to allow this search to take place without the possibility of any amendment being made? Sandy Define "doesn't work," does it give an error message or just not search? Is...

how can I fill labels in a chart, so that the grid lines don't in.
(Excel:) How can I fill labels in a chart, so that the grid lines of that chart do not interfere with the text in those labels? Hi, Double click the data labels and set the Patterns Area colour to be the same as the plotarea colour. Cheers Andy peterk wrote: > (Excel:) > How can I fill labels in a chart, so that the grid lines of that chart do > not interfere with the text in those labels? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info Peter - Or you could double click the gridlines and change their color to the faintest gray in the palette (you've alr...

Showing "NC" in data table
I have a bar chart with the data table displayed below. Some of the values should be showing the text label of "NC" (not computed), but, the table displays zeros. Can this be resolved? Hi, You need to apply a custom number format to the values in the worksheet. General;-General;"NC" The NC will then be displayed in the data labels and or data table. Cheers Andy AudPod wrote: > I have a bar chart with the data table displayed below. Some of the values > should be showing the text label of "NC" (not computed), but, the table > di...

Outlook 2007 Calendar will not open in Windows 7
For no apparent reason, my Outlook 2007 calendar will no longer open. Outlook itself opens fine, I can send and receive email and I can access my contacts, tasks and notes. My forthcoming calendar appointments even show up at the right hand side of my screen on my "To Do" bar. But when I try to switch screens to the calendar, the program simply freezes without any calendar information appearing. The "Calendar" button at the bottom right of the screen highlights in orange, without the highlighting disappearing on the "Mail" button (or "Cont...

How do I leave the right margin open ended?
I am writing a paper, and for some reason, my right margin is set up so that all of the text ends in the same spot. I've never had this happen before. How to I get the document back to where the text is open ended in the right margin. I believe from your description your paragraph style is for Justified text, change the alignment to left. You probably hit Ctrl+J, which is the keyboard shortcut for Justified alignment. Press Ctrl+L for Left alignment. If this is not what you are asking, please reply with more details on how the rgiht margin can be "open ended". Ho...

IE8 Add to Favorites
In IE8, when I want to add a site to My Favorites, when I go to select the folder to save it in, the list of all of my previously saves favorite folders completely opens up in expanded view. Since there are folders and multiple subfolders, is there a way to make only the half dozen or so main folders show up, then I could drill down and open each subfolder one at a time, instead of immediately seeing every single favorites folder I have ever created in a VERY long scrolling list? "M Skabialka" <mskabialka@NOSPAMdrc.com> wrote in message news:#nZS5pN$KHA....

How do I get a CAD drawing to open in Visio?
I have Visio - standard. There is a cad drawing I want to open on our network drive. How do I do this? Go to File > Open in Visio and change the file type to DWG or DXF. Visio Standard may not have all the same CAD capabilities as Visio Professional. The CAD support in Standard has varied from version to version. -- Mark Nelson Office Graphics - Visio Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "kar" <kar@discussions.microsoft.com> wrote in message news:9176AF99-4C07-4619-81B7-B3251604F5A0@microsoft.co...

Credit Card Receipts
For some reason some of our credit card payment receipts/applications changed the Credit Card ID field to say "STANDARD CHECK" rather than one of our three credit card ID's (VISA, AMEX, MC). The batch total when posting had the correct amount (i.e. our cash account was correct), but when we tried bundling the transaction through Bank Deposit Entry, the bank deposit is "short" by the amount of payments with the Credit Card ID field of "STANDARD CHECK". We are on GP 9.0 and use Credit Card Advantage. Any thoughts on this one? ...

Manager and POS doesn't open.
Hi every one. Most of the times when I open administrator & connect the database, the manager and POS doesn't open, after restart the computer again both start working. Any body have some idea please help me. Thanks Hi Akbar It happens with me somtimes, just pres Ctrl+Alt+Delete, you will find them in Task manager, end task & reopen again. I hope it works -- Ibrahim Zubair "Akbar Mian" wrote: > Hi every one. > > Most of the times when I open administrator & connect the database, the > manager and POS doesn't open, after restart the comp...

Excel 2007 prompt to open file as read only
I would like an Excel 2007 file to prompt the user to open a file as read only. How do I do this? Thank you! If you want the user to see a prompt, open the file. Do a SaveAs Click Tools|General options|and check "read-only recommended" They can still answer "no" to this prompt, right? SEllis wrote: > > I would like an Excel 2007 file to prompt the user to open a file as read > only. How do I do this? Thank you! -- Dave Peterson ...

Legend Line Spacing #2
Hi, I have a chart where the legend is double spaced. How do I change it to single spacing? Format Legend only has options for patterns, font and placement. I see nothing for line spacing. -- Thanks for your help. Karen53 On Wed, 9 Apr 2008, in microsoft.public.excel.charting, Karen53 <Karen53@discussions.microsoft.com> said: >I have a chart where the legend is double spaced. How do I change it to >single spacing? Format Legend only has options for patterns, font and >placement. I see nothing for line spacing. It sounds as though at least one legend label is wrapping...

Not Enough System Resources... When Opening Excel
One of my users has just started getting this error when she opens Excel: Not enought system resources to display completely. She is opening Excel, not an Excel file, ie: new worksheet. This is on XP with SP2 and all updates Excel is version 2000 9.0.6923 SP 3 The only other apps running are Outlook 2000 and SnagIt, a screen capture program. I'm thinking the easiest resolution will be to re-insatll Excel. Any other thoughts or suggestions? Thanks! Dave Nope. Close Excel and then go find a file called *.xlb and delete it - You may have to search in hidden files and folders. It&#...

Open Relay #12
Ok how do you close an open relay.. i have bee through the KB and it talkes about how tot test one but not specificly how to close one. i have in my smtp acesss relay tab all all but list below and authinticate check at the bottom. is the any thing else i have to do.. because im in one of those blacklist and they check me and said i still have an open relay Thank You Can we see their diagnostics? D whitten wrote: > Ok how do you close an open relay.. i have bee through the KB and it talkes > about how tot test one but not specificly how to close one. > i have in my smtp acesss...