Update Form

L

Little Penny

I have a UserID field that is in a form Called Computer and Users. The UseID field is the primary key to the UserInfo Table The Users table and
Computers table are joined (one to Many} by the UserID are in a query which is the record set for the form. My UserID field in the form is set to
limit to list. The drop down show 3 columns (UserID First and Last name) only the UserID is bound to field.
I also have a NotInList event that will open a small from to create a new user and auto assined a UserID. I want to update the query the from is
based on so the new users ID is in the dropdown list. I tried

OnClose =Forms!frm_UserInfoQuery.Refresh
And =Forms!frm_UserInfoQuery.Requery

Neither worked. Any suggestion on how to get the from to update info.


Thanks
 
B

Brian Bastl

How about this?

If MsgBox("Would you like to add this User?", vbYesNo) = vbYes Then
DoCmd.OpenForm "YOUR_FORM", , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
ctl.Undo
End If

you can eliminate the requery on your little pop-up form
OnClose =Forms!frm_UserInfoQuery.Refresh
And =Forms!frm_UserInfoQuery.Requery

HTH,
Brian

Little Penny said:
I have a UserID field that is in a form Called Computer and Users. The
UseID field is the primary key to the UserInfo Table The Users table and
Computers table are joined (one to Many} by the UserID are in a query
which is the record set for the form. My UserID field in the form is set to
limit to list. The drop down show 3 columns (UserID First and Last name)
only the UserID is bound to field.
I also have a NotInList event that will open a small from to create a new
user and auto assined a UserID. I want to update the query the from is
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top