Call a form from a form in the background (1 Viewer)

Cedarguy

Access developer wannabe
Local time
Yesterday, 19:19
Joined
May 8, 2012
Messages
39
Hello,

I'm not a VBA guy and am limited to using access macros. So I'm requesting guidance with the following (if its possible):

The user is on form 1
I need to invoke form 2 invisible to the user after he clicks a button
Fill in certain default values on form 2 and save it

Thanks,
 

RuralGuy

AWF VIP
Local time
Yesterday, 20:19
Joined
Jul 2, 2005
Messages
13,826
Forms are simply windows into table values. Why do you think you need to open another form?
 

Cedarguy

Access developer wannabe
Local time
Yesterday, 19:19
Joined
May 8, 2012
Messages
39
Thanks for responding;
There are 2 tables involved (Contact and Task) with a 1 to many relationship, respectively
The Contact form shows all the relevant fields while the tasks (child) appear below over which I don't seem to have any control
If the user wants to schedule a task for the contact, I need to create a task behind the scene; fill in the values and save the task
If there's a better way to do so, I'd appreciate knowing it.
Thanks,
 

RuralGuy

AWF VIP
Local time
Yesterday, 20:19
Joined
Jul 2, 2005
Messages
13,826
You can append a record to a table behind the scenes. Sorry it took so long. The site did not send me notification of your post.
 

Cedarguy

Access developer wannabe
Local time
Yesterday, 19:19
Joined
May 8, 2012
Messages
39
Thanks; would that be via an append query? trying this out but having difficulty setting values (via SetProperty); tips would be appreciated.
Regards,
 

sneuberg

AWF VIP
Local time
Yesterday, 19:19
Joined
Oct 17, 2014
Messages
3,506
I suggest trying to create the append query using the query designer and put in form references in wherever you need values from the form. If you keep the form open then you can test your query directly in the designer by clicking the datasheet view or running the query.

I can't think of any reason why you would need to set values (via SetProperty) if you create your query this way.
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 22:19
Joined
Jan 23, 2006
Messages
15,394
Do you have a set of predefined Tasks? Can any Task be Assigned to any Contact?

You may actually have 3 tables involved.

Task--->TaskIsAssignedToContact<--Contact

1-----to-->many ...junctionTbl...many<-------1


Is there some other factor(s) involved by which only some Tasks can be assigned to only certain Contacts?
 

Users who are viewing this thread

Top Bottom