PDA

View Full Version : VBA programming Help RE EDITED.



MJStudent
05-31-2012, 10:02 AM
Hello,

I'm sorry for the double post I'm new to this forum and for some reason I cant delete the one below this. I found a way to explain it in a easier way.

My name is Michael and i'm a last year student. I have a important question. I'll try to cut it as short as possible but also as clear as possible.

First of all I work with Acces 2007.
Line of code
strAfdeling = strAfdeling & "AFDELING TITEL"

That's my string . In that string is HTML codes inserted. I'm making a generate HTML button.
So Instead of AFDELING TITEL I want information coming from a field in one of my Table's (tblAfdeling) and fldAfdeling wich has Names written in them. Those names have to go between the "". Understand? I do hope so . Hope you can help!

BrianMH
06-01-2012, 12:37 AM
So you have a table with 1 a column of values that you want to concatenate into a string?

fldAfdeling
A
B
C
D
E
F
G
H


Then you want the string to be.

"ABCDEFGH"

Is that correct? Is this for an assignment? We don't write code for assignments but we can give you some ideas of what you need to do.

MJStudent
06-04-2012, 08:09 AM
Dear BrianMH

I found my problem. So thankyou for the help. But now I have another question.
So what i'm trying to achieve is to go to an EXISTING form named frmAA_Invullijst. And in that form I would like to go a also EXISTING Tab called InvulSubDiploma. So I would like to have the code to go from frmA_IBgoesIT to frm_Invullijst and within this form to tab named InvulSubDiploma and the Subform within called frmDiploma.

Code I Already have

Private Sub knpGoToLokaal_Click()
DoCmd.OpenForm ("frmAA_Invullijst")
End Sub


Thankx in advance!

My teacher said It contained something with forms!...!.. blabla This is what I would like to have

BrianMH
06-06-2012, 12:28 AM
If it is just a tab on a form you should check out setfocus.

Once you open frmAA_Invullijst you would use:
frmAA_Invullijst.InvulSubDiploma.SetFocus

MJStudent
06-06-2012, 04:08 PM
Great!!!! That works Perfect! Cheers!

BrianMH
06-07-2012, 12:16 AM
Jeersaneryy I'm confused as to why you are posting. Did you have a question?

Your signature is spam by the way.
MJStudent I'm glad I could help. Can you mark the thread as solved?

Thanks