Access help

Soldato
Joined
17 Apr 2003
Posts
6,518
Location
hOme
hi guys

i'm having a bit of trouble with a database ive got in access here

i've got a from which has 2 values:

CD_ID
Vinyl_ID

and a button which should load a vinyl information form if the Vinyl_ID has a value in it and the CD_ID value is null and vice versa

i have Remix_ID determining what information to show on the vinyl or cd info form although thats irrelevant

what syntax do i need to use in the visual basic expression builder? i have this but it doesnt work :(

Code:
Private Sub Command20_Click()

    Dim stDocName As String
    Dim stLinkCriteria As String
    
CD_ID.SetFocus
If CD_ID.Text = Null Then

    stDocName = "frm_vinylinfo"
    
    stLinkCriteria = "[RemixID]=" & Me![RemixID]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Else

    stDocName = "frm_cdinfo"
    
    stLinkCriteria = "[RemixID]=" & Me![RemixID]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    End If
    
End Sub

please help :(
 
ok ive tried that code and the button doesnt work at all now :(

i will have a fiddle see what i can do

i added you to msn i hope yo dont mind
 
i need to write a fairly complex query (for me anyway) but havent got a clue, at college all they taught us is how to make a basic one in design view or even more basic ones in sql :mad:
 
Code:
    stDocName = "tbl_Remix Subform"
    stLinkCriteria = "[Key]=" & "'" & Me![Key] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    
End If

I've got this code so far to show tunes in the same key as the one you're viewing details on but as well as showing tunes in the same key i want it to show ones in compatible keys

So at the moment if you have a track in Am and run the code it only shows tracks in Am, but i want it to show Am, Dm, Em and C

to do this for all the keys will use loads of ifs i think but i should be able to do that, its just the code to show more than one key in the opened form

please help :(
 
i've got it now :)

but access has just decided to throw up a random "there is not enough memory" error, and wont even let me delete any code, i've tried it on more than one computer

ive got old backups but a program like access still shouldnt just decide to screw up hours of work whenever it feels like it

:mad:
 
Back
Top Bottom