Avatar billede dougheffernan Nybegynder
12. juni 2006 - 12:17 Der er 15 kommentarer og
1 løsning

Ændre egenskaber for formular

Sagen er at min database er lavet så man kan skifte sprog ved klik på en knap, hvilket mange af vore udenlandske brugere er glade for, men det kan så vidt jeg ser det kun lade sig gøre når formularen er i enkelt/fortløbende formular visning!
Når formularen er i denne visning (op imod Dataark-visningen), kan man ikke bruge piletasterne til at navigere og man kan heller ikke indsætte en tom række.
Er der en måde at komme udover disse "hurdles"?
Avatar billede terry Ekspert
12. juni 2006 - 12:34 #1
In Datasheet view you have to alter the name of the control, this is what is displayed at the top of the column.

Not sure what you mean by (kan man ikke bruge piletasterne til at navigere og man kan heller ikke indsætte en tom række.) Why cant you?
Avatar billede dougheffernan Nybegynder
12. juni 2006 - 13:18 #2
What you suggest for the Datasheet view is exactly what I do in fortløbende/enkelt formular-view. It just doesn't work in Dataview.

I can use left and right arrows, but the up and down ditto's only navigate to the next field (column), NOT up/down in the rows. Since the form isn't in Datasheet view, I cannot insert an empty row.
Avatar billede terry Ekspert
12. juni 2006 - 13:39 #3
Isnt it the labels Caption property you change?

To insert an empty row you could add a button using th ewizard to inser and empty row (new record)
Avatar billede fdata Forsker
12. juni 2006 - 21:25 #4
Up/Down = Ctrl-PageUp/Ctrl-PageDn
Avatar billede dougheffernan Nybegynder
13. juni 2006 - 11:34 #5
ctrl-pageup/pagedown navigerer til en ny post på hovedformularen, ikke til den næste række i min underformular.
Ctrl+PilOp og Ctrl+PilNed virker derimod, men kun på min PC (Access 2003), ikke hos brugerene (Access 2002 Runtime)! :(
Avatar billede dougheffernan Nybegynder
13. juni 2006 - 11:40 #6
You are right, Terry, it is the caption I change.
How would I go about changing the Name instead?
A bit of the code I use now...

    Select Case Forms("Ordreseddel").Language
      Case labLangDK
        While Not rst.EOF
          FormCtrl.Controls(rst!ControlName).Caption = rst!ControlCaption_DK
          FormCtrl.Caption = rst2!ControlCaption_DK
          rst.MoveNext
        Wend

rst contains the name of the form on which the control reside, rst2 the name of the control.
Avatar billede dougheffernan Nybegynder
13. juni 2006 - 11:45 #7
To illustrate:
On the subform I have a, amongst others, a control called lblVarenummer, with a Caption that reads Varenr.
In Fortløbende formular-view, I can change the text to different languages using the above code. You told me that I need to change the Name property of the control instead. This leads me to believe that when I change the view of the form from Fortløbende formularer to Dataview, then the control (column) will change to lblVarenr. This is not the case.
Avatar billede terry Ekspert
13. juni 2006 - 12:01 #8
I'm not at all sure you can unless you open the form in design view first.

To me it doesnt sound like a good idea changing a controls name. If I were you I would keep to continuous forms and try and find a solution to this.

In a sub form/continuous form the sub form must have focus first before you can use the up/down arrows to navigate through the records.
Avatar billede dougheffernan Nybegynder
13. juni 2006 - 12:06 #9
I have the same mind in that matter, terry, don't mess with the control names.
Besides, it doesn't make any difference in Design view either.

Yes, that subform DOES have focus, it consists of a number of orderlines and it's when you have placed the cursor in the first row, first column I mean regarding the above statements.
Avatar billede terry Ekspert
13. juni 2006 - 12:39 #10
and you cant use the up/down keys to navigate?
Avatar billede terry Ekspert
13. juni 2006 - 12:44 #11
If you are in a column then you can, as fdata states, use Ctrl+PageUp/Ctrl+PageDn
Avatar billede terry Ekspert
13. juni 2006 - 12:44 #12
but you MUST first have focus on the form
Avatar billede terry Ekspert
13. juni 2006 - 12:46 #13
Eacg form can have focus on a specific object at the same time, but the form must also have focus. Hope you understand what I mean.
Avatar billede terry Ekspert
19. juni 2006 - 14:28 #14
status?
Avatar billede dougheffernan Nybegynder
20. juni 2006 - 15:19 #15
I understand perfectly, terry, but it doesn't solve my problem and Ctrl+PageUp/Ctrl+PageDown doesn't work in the form.
Avatar billede terry Ekspert
20. juni 2006 - 15:35 #16
Thanks

Dont understand why Ctrl+PageUp/Ctrl+PageDown doesnt work.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester