G
Guest
I’m a struggling learner on programming and would appreciate some help. This
is where I’m up to:
I have read several introductory articles on programming as referred to on
this excellent site. As a result I can do one or two basic commands like
opening a form, but that’s all, and I still feel I have absolutely no idea of
the underlying principles. I compare this with other areas such as using
forms or queries, where I have read the help notes and articles and I’m on my
way.
I set myself a goal of taking a simple database I created using macros and
re-creating it by replacing each macro with code. Here’s one I’m completely
stuck on: Opening Form2 from Form1, setting the value of a control, and
going to a control.
The macro actions and settings are:
Echo (Echo On = No)
Close (Object Type = Form; Object Name = Form1; Save = No)
OpenForm (Form Name = Form2; View = Form; Data Mode = Add; Window Mode =
Normal)
SetValue (Item = [Forms]![Form1]![RecordID]; Expression = RecordID)
GoToControl (Control Name = Control1)
I started by looking in VB help and searching for SetValue - no references
at all. Mental brick wall.
What would help me is if someone could write the above in code, and assume I
know nothing (which is pretty accurate) and explain each line to me in a way
that gives me the *insight*, the ability to go on to other examples and not
be bamboozled by slight changes.
is where I’m up to:
I have read several introductory articles on programming as referred to on
this excellent site. As a result I can do one or two basic commands like
opening a form, but that’s all, and I still feel I have absolutely no idea of
the underlying principles. I compare this with other areas such as using
forms or queries, where I have read the help notes and articles and I’m on my
way.
I set myself a goal of taking a simple database I created using macros and
re-creating it by replacing each macro with code. Here’s one I’m completely
stuck on: Opening Form2 from Form1, setting the value of a control, and
going to a control.
The macro actions and settings are:
Echo (Echo On = No)
Close (Object Type = Form; Object Name = Form1; Save = No)
OpenForm (Form Name = Form2; View = Form; Data Mode = Add; Window Mode =
Normal)
SetValue (Item = [Forms]![Form1]![RecordID]; Expression = RecordID)
GoToControl (Control Name = Control1)
I started by looking in VB help and searching for SetValue - no references
at all. Mental brick wall.
What would help me is if someone could write the above in code, and assume I
know nothing (which is pretty accurate) and explain each line to me in a way
that gives me the *insight*, the ability to go on to other examples and not
be bamboozled by slight changes.