popup form help needed

carahorse

Registered User.
Local time
Today, 09:13
Joined
Apr 1, 2013
Messages
36
Ok so I have looked for hours for a solution to this problem.

I have an Add New SPBookings form with a subform SP Details Query. SP Details Query has 5 columns, BookingID, DetailsID, Lookup Contact, LookupContact:ID. I also have a popup form called Contacts Query. How do I get new records (Full name) from the Popup form "contacts query" to populate the subform SP Details Query? Copy and paste works...sort of...half thetime with refresh button, but I need a more reliable solution that wont confuse users.... and yes I have tried to connect the form "Contacts Query" to the Details Query form. but I am gathering that the Lookup Contacts Column is preventing that somehow. Is there a vba code that could automatically copy the full name to the lookup column? also, any time I connect an Access Database to sharepoint all of the relationships become indeterminate... thanks in advance!
If you have any sample VBA codes that would be great =)
A VBA cod to solve this one would be great
https://plus.google.com/u/0/photos/...5942921617211714194&oid=117081647515742386389
 
Last edited:
Change the line code that opens the popup so that it opens as Dialog.
Create a line of code after that to requery the sub form.
 
In more detail:

Something like:

Dim stDocName As String

stDocName = "SP Details Query"
DoCmd.OpenForm stDocName, , , , , acDialog

The next line depends on which form module the code is written in. If it is in the main form:
Me.[SP Details Query].Form.Requery

But if it is in the Sub form:
Me.Requery

I have no experience of sharepoint, so I am unable to comment on any issues you may have with that.
 
ooh thanks for the suggestion, just to be certain, I would put this in a module and have the module triggered on After Update of the Full name column on the SP Contacts Query Form?

Additional info---SP Contacts Query Form (pop up mode) is what we are using to add records to the database, usually I could have a subform/query that would let me directly choose from list or add to on same row----

Thanks for the help, I'm just beginning with VBA...
 
How do you open the pop up form at the moment.
 
I have a vba coded button on a blank form that opens SPBookings Query and then opens the SPContacts Query form. I'm helping a horse rescue and that isbwhat this app is for:)
 
It sounds to me as though "SP Details Query" is not actually a sub form.
You could try the following code for the button instead of your current code.

Code:
Dim stDocName As String

stDocName = "SP Details Query"
DoCmd.OpenForm stDocName, , , , , acDialog
Forms![SP Details Query].Requery
 
5943924756043350994

https://plus.google.com/u/0/photos/...5943924756043350994&oid=117081647515742386389

hmm still getting the error message....

here is the process I am hoping for...
1. Open the SPBookings Query form and SPDetails Query form, and contacts form in one click ( this is good)
2. Copy the list of names I just entered in the Full Name Column of the SP Contacts Query and Paste them into the SP Details form on the SPBookings form ( so far unsuccessful) as you can see by the pic in the link. I am getting error messages even with using your code to requery the data. Any ideas?

It would be great if the access would just create a relationship between the SPDetails Query form and the SPContacts Form, it has fields that should work (same id, long interger ect), so far I have been unsuccessful at that as well...sigh
 
The message you displayed in your attachment is usually produced when entering something into a combo box that is not in its list.
Can you post a copy of the db in A2003 mdb format that we can play with. :)
 
I don't have MS Access 2003, unfortunately. The database worked fine when I was able to set up a copy of a normalized database with Ms Access 2007. But using the lookup fields with sharepoint throws ms access for a loop.... so I need to find a way to get the new customer information from the Contacts form to the Details form.. just wish I knew more. I have seen posts about update queries ect, but it looks complicated? any ideas?
 
I know you don't have A2003 but you can make a copy of the db and then convert it to A2003.
 
That's ok I solved it, will post the solution in a few days thanks!
 

Users who are viewing this thread

Back
Top Bottom