CaptainBob007
Programmer
Hi -
I'm working on a form to store pictures associated with given properties. The picture part of it works fine, I'm trying to figure out the association to a property now.
In my first form, I have all the details about the property, with primary key PropID. The address of the property is shown in a combo box, with a bound column for the PropID (which is a long integer). On this form I have a button which opens the "add photo" form.
The "Add Photo" form has a similar combo box where you can type in an address and it will relate the PropID of that address. Primary key on this form is PhotoID.
In both forms, the address combo box populates a "PropID" text field (invisible) on the form, which serves as the link to the table.
I'm passing the PropID value from the property form to the AddPhoto form using OpenArgs, and the value is making it through to the form fine as I'm using a MsgBox to check it, however now I am trying to set the PropID value of the "AddPhoto" form with this passed value, and it keeps on giving me an error that I cannot assign that value. I've tried assigning the PropID to the proper column of the combo box and the PropID text field. I have also tried passing the text address into the Address combo box, and it wont let me assign any of the values.
How can I pass the value (either the Long Integer or the text, I really dont care) from the one form to the other so the photo I'm importing can be related to the correct property? I've been looking around the forum at lots of posts related to passing variables, but havent come across anything quite like this yet. Any help would be appreciated.
~Bob
I'm working on a form to store pictures associated with given properties. The picture part of it works fine, I'm trying to figure out the association to a property now.
In my first form, I have all the details about the property, with primary key PropID. The address of the property is shown in a combo box, with a bound column for the PropID (which is a long integer). On this form I have a button which opens the "add photo" form.
The "Add Photo" form has a similar combo box where you can type in an address and it will relate the PropID of that address. Primary key on this form is PhotoID.
In both forms, the address combo box populates a "PropID" text field (invisible) on the form, which serves as the link to the table.
I'm passing the PropID value from the property form to the AddPhoto form using OpenArgs, and the value is making it through to the form fine as I'm using a MsgBox to check it, however now I am trying to set the PropID value of the "AddPhoto" form with this passed value, and it keeps on giving me an error that I cannot assign that value. I've tried assigning the PropID to the proper column of the combo box and the PropID text field. I have also tried passing the text address into the Address combo box, and it wont let me assign any of the values.
How can I pass the value (either the Long Integer or the text, I really dont care) from the one form to the other so the photo I'm importing can be related to the correct property? I've been looking around the forum at lots of posts related to passing variables, but havent come across anything quite like this yet. Any help would be appreciated.
~Bob