Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a Form in popup mode and go to Last Record (dbw_hide) 1

Status
Not open for further replies.

lmarc

Technical User
Mar 6, 2009
27
PT
Here it goes!

I desire to open a form in popup mode and goes to the last record.

This doesn't work!
Code:
Private sub form_open(cancel as integer)
 DoCmd.RunCommand acCmdRecordsGoToLast
'...neigther this
 DoCmd.GoToRecord , , acLast
So, wen the database window of Access 07 'hided', i just can't go to the LastRecord, wy? With databse windows maximized not (hide) works fine, but otherwise does not do what i want!

Give me a hint!?
regards
 
lmarc . . .

Hmmm ... So you know, I ran a simulation of what you have with the code I presented and No Problemo! Only thing I can think of now is recordset size.

When the form does fully load, [BLUE]how many records are you talking?[/blue]


See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 

There have been hacks around for years allowing you to present an Access form so that it looks like a Visual Basic form, i.e. doesn't have the Access window in the background. Out of curiosity, I've investigated those that have come my way, because I deal in a user population that is very low-tech, preferring a VB looking interface to an Access window in the background, but I have never found one yet that didn't come with huge performance hit!

Bottom line, I think, is that if you want a Visual Basic looking database, you need to use Visual Basic as a front end with Access, or some other app, as the back end.

And if you're going to go that route, you'd be better off using a back end with better security than Access.

The Missinglinq

Richmond, Virginia

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

Well, if thinking about the subject and perhaps some 50 daily .. are not so many!? isn't!?

You tell me that you try it an works like a charm? hmmmm



Hey missinglinq

Yes, and you should have all the reason, probably the best way to do this kind of work is as you say, but this kind of work im doing is very (simple and small). Also I am not yet an expert like as would be ;)

Make your life an example for a better world.
 
I'm still waiting the solution if anyone have it, just tell me. I still can not find it :p
 

You've been given all the normal of the usual solutions for this problem. You admit that they work unless you hide the database window, so I'm guessing it's related to that.

I'm also guessing that you're going to have to decide which you want the most; to hide the Access window or to go to the last record on opening,

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Well, it seems that only with the Access window visible i can go to the last record!? Is that no way to go Last record hidden Acces window? what a bummer..

I prefer both! i dont know wy but.
I put an example if anyone want to download go ahead!!

Make your life an example for a better world.
 
OK. I just solve this issue.
First of all the problem wasn't from the Access window be or not hide, the question resided in the Switchboard code. When ever you hit the link option in Swicthboard to open the specific form he allways be opened in add record. So i changed this Line.
From this...
Code:
Case conCmdOpenFormAdd
     DoCmd.OpenForm rs![Argument], , , , acAdd
To this
Code:
Case conCmdOpenFormAdd
     DoCmd.OpenForm rs![Argument], , , , acFormEdit, acWindowNormal

I hope this helps any one like i disired for me ;)

Resolved!

Make your life an example for a better world.
 

I prefer both!

I prefer a 50 cent Montecristo Rothchilde cigar, but sadly, they run $9 to $10 apiece!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Do you smoke Missinglinq?! There's always more ways to quit smoking!! ;)

Make your life an example for a better world.
 
lmarc . . .

[ol][li]Note: the simulation I ran was on a form whose recordsource is an [blue]SQL[/blue] statement, based on a table with [blue]32 fields[/blue] and a recordcout of [blue]4,252,331 records![/blue][/li]
[li]I've never heard of or experienced a hidden db window causing problems in code. In fact for all my clients, I always hide the window. Been doing this for years! Hiding the db window is also one of the 1st things applied in access security schema. My point is: [blue]I doubt very seriously if the state of the db window has anything at all to do with.[/blue][/li][/ol]
There's one thing that could explain it all ... that is if your using the infamous [blue]access 2007![/blue] ... Already full of problems. I'm currently using 2000 at home and XP at work.

If you have other db's on your system try the code there as a test.

[blue]Your Thoughts? . . .[/blue]

BTW: what version access are you using?

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hi Ace.
Sure and never doupted your word, but the issues sometimes are never the same thing isn't!? For a type like you tested with that kind of recordsource is most compreensive that was no problemo, otherwise you had told me.

Yes, in the first post i mentioned access 07. I was using access 2003 and now i currently use 2007 with xp (to see if he is realy infamous, or not)and 2000 i just do not have it.

If you have other db's on your system try the code there as a test.
Like I said, the problem was in the Switchboard code, and if i did not change it, probably he will never worked.

Your Thoughts... and my regards

Make your life an example for a better world.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top