keuzelijst in Tabel

Status
Niet open voor verdere reacties.

mbakker71

Gebruiker
Lid geworden
25 mei 2012
Berichten
163
Hallo

ik ben bezig met een database te maken maar 1 ding lukt mij maar niet. Hoe krijg ik een keuzelijst in een tabel. Ik heb gezien dat het kan maar hoe? Het is een tabel formulier.

Afbeelding1.png

Weet iemand misschien het antwoord hier op?

M.V.G
Martijn Bakker
 
Je haalt een paar dingen door elkaar, geloof ik. Een tabelformulier bestaat namelijk niet. Wel heb je formulieren, die je op een tabel kunt baseren. En daarop kun je prima keuzelijsten maken, al dan niet met wizard. In een tabel kun je ook een keuzelijst maken (met wizard). Persoonlijk zou ik dat alleen doen voor gegevens die je niet uit een tabel hoeft te halen, zoals en veld [Aanhef] waarin je de opties De heer en Mevrouw zet, of [Geslacht] voor de opties Man, Vrouw, Onbekend.
 
Ik had het al gevonden maar 1 ding lukt mij maar niet. ik heb ingesteld dat als je op een record klikt dat er dan een formulier opent maar elke keer als ik daarop klikt krijg ik de verkeerde record in de form. het is een single form. ik heb al een paar dingen geprobeerd maar het blijft maar niet lukken.

bey martijn
Database link:
https://docs.google.com/open?id=0B6Ut7959T-xqb25wTVdZMm5GNlU

ps: ik heb op de begin een form gemaakt waar je moet zoeken welke naam. weet iemand hoe ik bij de home pagina dan rechtsboven de tekst van "Welkom [Naam geselecteerde]" kan zetten
 
Over welk formulier heb je het in je vraag?
 
het is homescrn en dan disposal de link zit bij de studynumber

m.v.g Martijn Bakker
 
Als je bereid bent om de macro achter je te laten:
Code:
Private Sub Study_Number_DblClick(Cancel As Integer)
    DoCmd.OpenForm "Rea Tracking", , , "[Tracker_ID] = " & Me.Tracker_ID
End Sub
 
Ik heb het in VBA gedaan maar krijg die link nu niet meer. Ik druk 10x maar hij laad niks.

Private Sub Study_Number_DblClick(Cancel As Integer)
DoCmd.OpenForm "Rea tracking", , , "[tracker_ID = " & Me.Tracker_ID
End Sub

bey martijn
 
Laatst bewerkt:
Dit is de functie die ik gevonden heb.
Code:
Option Compare Database
Option Explicit

Declare Function abOpenClipboard Lib "User32" Alias "OpenClipboard" (ByVal Hwnd As Long) As Long
Declare Function abCloseClipboard Lib "User32" Alias "CloseClipboard" () As Long
Declare Function abEmptyClipboard Lib "User32" Alias "EmptyClipboard" () As Long
Declare Function abIsClipboardFormatAvailable Lib "User32" Alias "IsClipboardFormatAvailable" (ByVal wFormat As Long) As Long
Declare Function abSetClipboardData Lib "User32" Alias "SetClipboardData" (ByVal wFormat As Long, ByVal hMem As Long) As Long
Declare Function abGetClipboardData Lib "User32" Alias "GetClipboardData" (ByVal wFormat As Long) As Long
Declare Function abGlobalAlloc Lib "Kernel32" Alias "GlobalAlloc" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Declare Function abGlobalLock Lib "Kernel32" Alias "GlobalLock" (ByVal hMem As Long) As Long
Declare Function abGlobalUnlock Lib "Kernel32" Alias "GlobalUnlock" (ByVal hMem As Long) As Boolean
Declare Function abLstrcpy Lib "Kernel32" Alias "lstrcpyA" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
Declare Function abGlobalFree Lib "Kernel32" Alias "GlobalFree" (ByVal hMem As Long) As Long
Declare Function abGlobalSize Lib "Kernel32" Alias "GlobalSize" (ByVal hMem As Long) As Long
Const GHND = &H42
Const CF_TEXT = 1
Const APINULL = 0

Code:
Function Clipboard2Text()
Dim hMemory As Long, hMyMemory As Long, lpMemory As Long, lpMyMemory As Long
Dim wSize As Long
Dim retval As Variant
Dim wFreeMemory As Boolean
Dim wLen As Integer, wClipAvail As Integer
Dim szText As String

    If abIsClipboardFormatAvailable(CF_TEXT) = APINULL Then
        Clipboard2Text = Null
        Exit Function
    End If

    If abOpenClipboard(0&) = APINULL Then
        MsgBox "Unable to open Clipboard.  Perhaps some other application is using it."
        GoTo CB2T_Free
    End If

    hMemory = abGetClipboardData(CF_TEXT)
    If hMemory = APINULL Then
        MsgBox "Unable to retrieve text from the Clipboard."
        Exit Function
    End If
    wSize = abGlobalSize(hMemory)
    szText = Space(wSize)

    wFreeMemory = True

    lpMemory = abGlobalLock(hMemory)
    If lpMemory = APINULL Then
        MsgBox "Unable to lock clipboard memory."
        GoTo CB2T_Free
    End If

    ' Copy our string into the locked memory.
    retval = abLstrcpy(szText, lpMemory)
    ' Get rid of trailing stuff.
    szText = Trim(szText)
    ' Get rid of trailing 0.
    Clipboard2Text = Left(szText, Len(szText) - 1)
    wFreeMemory = False

CB2T_Close:
    If abCloseClipboard() = APINULL Then
        MsgBox "Unable to close the Clipboard."
    End If
    If wFreeMemory Then GoTo CB2T_Free
    Exit Function

CB2T_Free:
    If abGlobalFree(hMemory) <> APINULL Then
        MsgBox "Unable to free global clipboard memory."
    End If
End Function
En dit is een manier om hem te testen. Ik heb dat zelf overigens niet gedaan.
Code:
Sub testit14()
Dim s1 As String
   s1 = Clipboard2Text
   Debug.Print s1
End Sub
 
Ik zeg eerlijk ik snap er geen bal van. van die code kan ik hem gewoon ctrl + c bij de log in code doen (wel in VBA)
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan