Avatar billede bmhaj Praktikant
01. august 2006 - 13:58 Der er 6 kommentarer og
1 løsning

Fortløbende underformular i fortløbende underformular

Jeg har brug for at kæde en fortløbende underformular sammen med en anden fortløbende underformular.

Har forsøgt at lave en knap fra den ene underformular (A) til den anden underformular (B), og ved at sætte denne kode på  'DoCmd.OpenForm "fStruktur33", acNormal, , "[LokationsID]=" & Me![LokationsID]'

Problemet er 'LokationsID' ikke bliver udfyldt i underformular B.
Avatar billede terry Ekspert
01. august 2006 - 14:47 #1
Where is the button on sub form A? It could be an idea to put a button in the actual detail record so that you can be sure a record is selected in the sub form A.

If [LokationsID] is a text field you should use
DoCmd.OpenForm "fStruktur33", acNormal, , "[LokationsID]= '" & Me![LokationsID] & "'"


Are you sure that Me![LokationsID] contains a value (try debugging)
Avatar billede bmhaj Praktikant
01. august 2006 - 15:11 #2
The button in A is places in the detailsection, and LokationsID do contain a value. LokationsID is number field.

Have tried your code without any luck..... Any other suggestions?
Avatar billede terry Ekspert
01. august 2006 - 15:41 #3
No, but if you can send me your dB then perhaps I can see the problem?

eksperten@NOSPAMsanthell.dk

remove NOSPAM and please ZIP the file Outlook blocks MDB files

If you send it I'll take a look a little later, rather busy righ t now.

mvh
Terry

Oh!
Try

DoCmd.OpenForm "fStruktur33", acNormal, , "[LokationsID]= " & Me.[LokationsID]
Avatar billede terry Ekspert
01. august 2006 - 15:49 #4
you must also have a field on sub form B named LokationsID.


But wait! Why are we using DoCmd.OpenForm if it is a sub form? Do you mean a sub form or do you open another form with a sub form??
Avatar billede bmhaj Praktikant
01. august 2006 - 15:55 #5
I open another subform from subform A. Both foms contains the field LokationsID.

My problem is that I need a running form within a running form. I do not know if there are other solutions than DoCmd.
Avatar billede terry Ekspert
01. august 2006 - 17:57 #6
can you send me your dB?
Avatar billede terry Ekspert
02. august 2006 - 14:26 #7
thanks
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