PC Review


Reply
Thread Tools Rate Thread

Adding delivery adddress

 
 
Simon
Guest
Posts: n/a
 
      3rd Dec 2006
I have a order form which has the account number, i also have a combo
box that lets be choose which deliveyr address to send it to. If it a
new delliver address that i do not have on recored i want a button to
open a new recored in frmDeliveryAddress to i can type in a new
address.

I have done the button but im not sure how set the AccountNumber on
frmDeliveryAddress to be the same as the one on frmOrder.

Thanks

Simon

 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      3rd Dec 2006
Hi Simon

If you have 2 tables - one for cleints (or whatever) and one for delevery
address 1st you need to ensure that you have the tables linked
You could use the field AccountNumber or clientID or whatever.

eg.
tblClients
AccountNumber
etc.

tblDeliveryAddress
DeliveryAddressID
AccountNumber - linked with tblClients
etc.
Change the names to what you normally use

Next ensure that there is a field called AccountNumber on both the main form
and the popup form (I assume you are uwanting a popupform for the delivery
address)

Assuming that you do have a field called AccountNumber on both the main form
and the popup form, you could use this

Private Sub ButtonName_Click()
On Error GoTo Err_ButtonName_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "PopUpFormName"
stLinkCriteria = "[AccountNumber]=" & Me![AccountNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ButtonName_Click:
Exit Sub
Err_ButtonName_Click:
MsgBox Err.Description
Resume Exit_ButtonName_Click
End Sub

Change the "ButtonName" in the above to what it is on your form

Hope this helps

--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :-)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.


"Simon" wrote:

> I have a order form which has the account number, i also have a combo
> box that lets be choose which deliveyr address to send it to. If it a
> new delliver address that i do not have on recored i want a button to
> open a new recored in frmDeliveryAddress to i can type in a new
> address.
>
> I have done the button but im not sure how set the AccountNumber on
> frmDeliveryAddress to be the same as the one on frmOrder.
>
> Thanks
>
> Simon
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Adding Delivery Point Barcode to Existing Label list Suzanne S. Barnhill Microsoft Word Document Management 1 15th Dec 2010 06:01 AM
how do i save adddress book in outlook =?Utf-8?B?Sm9yZ2UgQ2VwZWRh?= Microsoft Outlook Discussion 0 18th May 2006 01:03 PM
Adding exchange account to outlook but want seperate mail delivery =?Utf-8?B?bXN0b3V0MjAwMQ==?= Microsoft Outlook Discussion 3 15th Dec 2005 01:51 AM
How do you get Mr. & Mrs. to appear on adddress labels? =?Utf-8?B?U2hlbGx5J3MgUXVlcnk=?= Microsoft Outlook 1 6th Mar 2005 07:20 PM
Autocomplete adddress doesn't work =?Utf-8?B?TWl0aW5tYW4=?= Microsoft Outlook Discussion 1 28th Oct 2003 06:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:54 AM.