I have form 1 Main form and form 2 which is open dialog with a number of unbound fields for data entry now my question is can I pass all the entries on the dialog to some global variables then use the variables to update form 1 is there anything wrong with this method?
In my opinion it is not a good way, and I would never code that way. But again, if you understand the reasons and implications and weigh them it may make sense. That is why I like reasons not hard rules. Here is a good discussion (not vb specific)
http://wiki.c2.com/?GlobalVariablesAreBad
Besides that there are a lot cleaner and IMO simpler ways to do it. I am going to assume the form is opened ACDIALOG stopping code execution in the calling form. My normal way to do this is in the OK button of the called form I put
me.visible = false
in the Cancel button I put
docmd.close acform, me.name
When the form is hidden or closed, execution returns to the calling form at the point after the pop up was called. You check if it is loaded (but hidden). If so you read the values off of the popup and do what you want, then close the pop up. If it is not loaded (cancel was selected or Xed out) then you do nothing. This is clean and compartmentalized.
Another method I use often, but rarely see done is to trap another form's event. So in the calling form you can trap the afterupdate events of the called form.
If I was going to return many values from a popup and felt compelled to use global variables it would be a single global variable. I would build a class module and instaniate a single instance. The properties would be the return values. Still would be my last choice.