Access Code Pushing Values

I have a customer database with [BillAddress] and [ShipAddress].  I am using 
a "yes/no" box titled[SameShipAddress?].  To automatically fill [ShipAddress] 
after checking the "yes/no" box I used this code in the after update event 
for the check box.

If Me![SameShipAddress?] Then
    If IsNull(Me![BillAddress]) Then
         
    Else
         [ShipAddress] = [BillAddress]
   End If
End If

This works for the selected customer, but then pushes the entry 
[BillAddress] of the previous customer to [ShipAddress] of all of the 
following customers.  

Any thoughts?
0
Utf
6/27/2007 6:02:02 PM
access.forms 6864 articles. 2 followers. Follow

6 Replies
706 Views

Similar Articles

[PageSpeed] 27

Sounds as though you're talking about an unbound control on your form.

Unfortunately, that's how they work.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"access is making me crazy" 
<accessismakingmecrazy@discussions.microsoft.com> wrote in message 
news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
>I have a customer database with [BillAddress] and [ShipAddress].  I am 
>using
> a "yes/no" box titled[SameShipAddress?].  To automatically fill 
> [ShipAddress]
> after checking the "yes/no" box I used this code in the after update event
> for the check box.
>
> If Me![SameShipAddress?] Then
>    If IsNull(Me![BillAddress]) Then
>
>    Else
>         [ShipAddress] = [BillAddress]
>   End If
> End If
>
> This works for the selected customer, but then pushes the entry
> [BillAddress] of the previous customer to [ShipAddress] of all of the
> following customers.
>
> Any thoughts? 


0
Douglas
6/27/2007 6:09:52 PM
Am I going about it with the wrong method? Can you think of a way to limit 
the entry just to the one record and have the  next record be an empty slate?
"Douglas J. Steele" wrote:

> Sounds as though you're talking about an unbound control on your form.
> 
> Unfortunately, that's how they work.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "access is making me crazy" 
> <accessismakingmecrazy@discussions.microsoft.com> wrote in message 
> news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
> >I have a customer database with [BillAddress] and [ShipAddress].  I am 
> >using
> > a "yes/no" box titled[SameShipAddress?].  To automatically fill 
> > [ShipAddress]
> > after checking the "yes/no" box I used this code in the after update event
> > for the check box.
> >
> > If Me![SameShipAddress?] Then
> >    If IsNull(Me![BillAddress]) Then
> >
> >    Else
> >         [ShipAddress] = [BillAddress]
> >   End If
> > End If
> >
> > This works for the selected customer, but then pushes the entry
> > [BillAddress] of the previous customer to [ShipAddress] of all of the
> > following customers.
> >
> > Any thoughts? 
> 
> 
> 
0
Utf
6/27/2007 7:04:00 PM
Try setting the control source of the field to

=([SameShipAddress?], [BillAddress], [ShipAddress])

(including the equal sign)

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"access is making me crazy" 
<accessismakingmecrazy@discussions.microsoft.com> wrote in message 
news:9F267AF2-AA2C-4359-9506-76B1B124B031@microsoft.com...
> Am I going about it with the wrong method? Can you think of a way to limit
> the entry just to the one record and have the  next record be an empty 
> slate?
> "Douglas J. Steele" wrote:
>
>> Sounds as though you're talking about an unbound control on your form.
>>
>> Unfortunately, that's how they work.
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "access is making me crazy"
>> <accessismakingmecrazy@discussions.microsoft.com> wrote in message
>> news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
>> >I have a customer database with [BillAddress] and [ShipAddress].  I am
>> >using
>> > a "yes/no" box titled[SameShipAddress?].  To automatically fill
>> > [ShipAddress]
>> > after checking the "yes/no" box I used this code in the after update 
>> > event
>> > for the check box.
>> >
>> > If Me![SameShipAddress?] Then
>> >    If IsNull(Me![BillAddress]) Then
>> >
>> >    Else
>> >         [ShipAddress] = [BillAddress]
>> >   End If
>> > End If
>> >
>> > This works for the selected customer, but then pushes the entry
>> > [BillAddress] of the previous customer to [ShipAddress] of all of the
>> > following customers.
>> >
>> > Any thoughts?
>>
>>
>> 


0
Douglas
6/27/2007 7:13:32 PM
Thank you for the response and trying to help.  which field should I set the 
control source for?  I tried [ShipAddress] and it came back with a circular 
reference error.

"Douglas J. Steele" wrote:

> Try setting the control source of the field to
> 
> =([SameShipAddress?], [BillAddress], [ShipAddress])
> 
> (including the equal sign)
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "access is making me crazy" 
> <accessismakingmecrazy@discussions.microsoft.com> wrote in message 
> news:9F267AF2-AA2C-4359-9506-76B1B124B031@microsoft.com...
> > Am I going about it with the wrong method? Can you think of a way to limit
> > the entry just to the one record and have the  next record be an empty 
> > slate?
> > "Douglas J. Steele" wrote:
> >
> >> Sounds as though you're talking about an unbound control on your form.
> >>
> >> Unfortunately, that's how they work.
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "access is making me crazy"
> >> <accessismakingmecrazy@discussions.microsoft.com> wrote in message
> >> news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
> >> >I have a customer database with [BillAddress] and [ShipAddress].  I am
> >> >using
> >> > a "yes/no" box titled[SameShipAddress?].  To automatically fill
> >> > [ShipAddress]
> >> > after checking the "yes/no" box I used this code in the after update 
> >> > event
> >> > for the check box.
> >> >
> >> > If Me![SameShipAddress?] Then
> >> >    If IsNull(Me![BillAddress]) Then
> >> >
> >> >    Else
> >> >         [ShipAddress] = [BillAddress]
> >> >   End If
> >> > End If
> >> >
> >> > This works for the selected customer, but then pushes the entry
> >> > [BillAddress] of the previous customer to [ShipAddress] of all of the
> >> > following customers.
> >> >
> >> > Any thoughts?
> >>
> >>
> >> 
> 
> 
> 
0
Utf
6/27/2007 7:54:00 PM
Rename the text box from ShipAddress to, say, txtShipAddress

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"access is making me crazy" 
<accessismakingmecrazy@discussions.microsoft.com> wrote in message 
news:3C07946A-21D5-4F63-9C70-FFA5947D4878@microsoft.com...
> Thank you for the response and trying to help.  which field should I set 
> the
> control source for?  I tried [ShipAddress] and it came back with a 
> circular
> reference error.
>
> "Douglas J. Steele" wrote:
>
>> Try setting the control source of the field to
>>
>> =([SameShipAddress?], [BillAddress], [ShipAddress])
>>
>> (including the equal sign)
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "access is making me crazy"
>> <accessismakingmecrazy@discussions.microsoft.com> wrote in message
>> news:9F267AF2-AA2C-4359-9506-76B1B124B031@microsoft.com...
>> > Am I going about it with the wrong method? Can you think of a way to 
>> > limit
>> > the entry just to the one record and have the  next record be an empty
>> > slate?
>> > "Douglas J. Steele" wrote:
>> >
>> >> Sounds as though you're talking about an unbound control on your form.
>> >>
>> >> Unfortunately, that's how they work.
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no e-mails, please!)
>> >>
>> >>
>> >> "access is making me crazy"
>> >> <accessismakingmecrazy@discussions.microsoft.com> wrote in message
>> >> news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
>> >> >I have a customer database with [BillAddress] and [ShipAddress].  I 
>> >> >am
>> >> >using
>> >> > a "yes/no" box titled[SameShipAddress?].  To automatically fill
>> >> > [ShipAddress]
>> >> > after checking the "yes/no" box I used this code in the after update
>> >> > event
>> >> > for the check box.
>> >> >
>> >> > If Me![SameShipAddress?] Then
>> >> >    If IsNull(Me![BillAddress]) Then
>> >> >
>> >> >    Else
>> >> >         [ShipAddress] = [BillAddress]
>> >> >   End If
>> >> > End If
>> >> >
>> >> > This works for the selected customer, but then pushes the entry
>> >> > [BillAddress] of the previous customer to [ShipAddress] of all of 
>> >> > the
>> >> > following customers.
>> >> >
>> >> > Any thoughts?
>> >>
>> >>
>> >>
>>
>>
>> 


0
Douglas
6/27/2007 9:32:27 PM
I think I have this figured out, thanks for the help!!

"Douglas J. Steele" wrote:

> Sounds as though you're talking about an unbound control on your form.
> 
> Unfortunately, that's how they work.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "access is making me crazy" 
> <accessismakingmecrazy@discussions.microsoft.com> wrote in message 
> news:B3059552-7396-424A-B112-CDFEB2EF6D84@microsoft.com...
> >I have a customer database with [BillAddress] and [ShipAddress].  I am 
> >using
> > a "yes/no" box titled[SameShipAddress?].  To automatically fill 
> > [ShipAddress]
> > after checking the "yes/no" box I used this code in the after update event
> > for the check box.
> >
> > If Me![SameShipAddress?] Then
> >    If IsNull(Me![BillAddress]) Then
> >
> >    Else
> >         [ShipAddress] = [BillAddress]
> >   End If
> > End If
> >
> > This works for the selected customer, but then pushes the entry
> > [BillAddress] of the previous customer to [ShipAddress] of all of the
> > following customers.
> >
> > Any thoughts? 
> 
> 
> 
0
Utf
6/27/2007 9:38:01 PM
Reply:

Similar Artilces:

VISE Value Pack Installer Problems
Someone sent me a post and I wanted to make sure they received it so I am posting it here again. The installer is an older version. This worked for me. Article 1341 Installer unexpectedly quits when launched on Mac OS X Summary Installer VISE installers may have difficulty detecting the operating system language on some Mac OS X machines, causing the installer to unexpectedly quit. A workaround is to have the user make a small change in 'International' System Preferences. Info � Some Mac OS X users have experienced a problem running Installer VISE installers on their machine...

Access Code Pushing Values
I have a customer database with [BillAddress] and [ShipAddress]. I am using a "yes/no" box titled[SameShipAddress?]. To automatically fill [ShipAddress] after checking the "yes/no" box I used this code in the after update event for the check box. If Me![SameShipAddress?] Then If IsNull(Me![BillAddress]) Then Else [ShipAddress] = [BillAddress] End If End If This works for the selected customer, but then pushes the entry [BillAddress] of the previous customer to [ShipAddress] of all of the following customers. Any thoughts? Sounds as...

Data source for PivotTable-Form in ACCESS 2000
Hi, this drives me crazy, 4 years ago I defined in an ACCESS 2000 application a "PivotTable-Form". The resulting EXCEL table inclusive the "Data refresh" works perfect. I now want to update/change the query for the "Data Source" but cannot find which query is behind the "PivotTable-Form" or behind the resulting EXCEL spreadsheet. When editing the properties for the "PivotTable-Form" or the EXCEL spreadsheet the "Data Source" is always blank. Question: Where does Access 2000 or EXCEL 2000 hide the respective data source (Query)...

access 2007 and custom toolbars in earlier version
Is there a way in Access 2007 (Enterprise) to modify a custom toolbar created in say Access 2002? In the help there are only topics about the quick access toolbar. I want to modify the action of a button, but right clicking and choosing customize, like used to be so easy (once you get used to it), is no longer possible. Does that mean no more custom toolbars and no backward compatibilty here? Help would be very welcome as the user friendliness of my user's experience is at stake here. ...

VBA coding
Hi everyone I am very new to vba coding. Though time to time I record macros. Some I want to edit my macro but I don't the vba codes. It there a place where all the codes/coomanda are stored. thanks Nadeem Hi the easiest way to access your macros to edit them is to choose tools / macro / macros, click on the macro you want to edit and press the EDIT button - you'll be taken directly to the appropriate code. (to get back to the workbook you can either close the code window, using the top X or use ALT & F11 to switch back and forth between the VBE Window & the workbo...

enter value based on drop down list of another field?
I have an excel 2003 spreadsheet with 3 worksheets. In sheet 1, I created a drop down list in column A based on values in sheet 3, column A (item number). Thisd data comes from sheet 3, where I have column A (Item #'s), column B (Item desc)an Column C (price) In column B of sheet 1, I have Item Descriptions and in column C I have price. I want this to automatically fill in based on what I enter in the column A sheet 1 and it should get the corresponding values from sheet 3 column B and C. I can make the drop down list in sheet 1 column B and C, but some of the descriptions need ...

edit network script for window pop-up, store values... help..
ok, I have a script that compares two dates: A scheduled pickup date - column J and The Acctual Picked up date - column K in order to be compliant, the time frame between these two dates can't not take longer then 2 days from the scheduled pickup date. Right now, the script when I run it, looks at all the data and in column N prefilles the =NETWORKDAYS formula and then runs the statistics, showing anything less then 0 as red and more then 2 as red, 0, 1, 2 as black. Then on the spreadsheet I have a formula that looks at the column N and counts the number ranges and figure out the per...

access 2003
I have 8 pages i need to link together to save data what is the best way to link them? tlenney, We can't see your *pages* or your tables so asking what is the best way to link will not yield you answers without a wee bit more information. By *pages* do you mean tabs or forms? What are your tables and how are they related to each other? Why would you need to link the data in order to save it? Or are you linking to an outside data source and you are trying to save that data within the database? -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been ...

Denied file access
When I attempt to open my money program, I get a message that says, There is a problem with your Windows security settings. I use Windows 98 and Money 2000. ...

Auditing Mailbox item access
Don't ask me why I am asking, you don't want to know....but Is it possible to monitor and log access not only to a mailbox, but actually to individual items within the mailbox and be able to trace it back to the specific item and user who accessed it? I am aware of the ability to log when a non-primary account logs into a mailbox, but that is not granular enough for the scenario I need to look into. The powers that be want to be able to see not only who accessed a particular mailbox, but actually who accessed a particular message within that mailbox. Just wanted to know if...

Access 97 conversion to 2000 and OpenRecordSet
We have a simple application developed in Acees 95 / upgraded to 97 and now we wish to move to 2000. the application 'almost' upgrades itself apart from a problem we are havinng with OpenRecordSet . The code is simple and I know (with hindsight) it can be much neater but when you do not spend a great deal of time and it works then leave alone. Code throws up Run Time eror 13 at the OpenRecordset command when run. Have read lots of docs but confused as to change this seems a major problem. Have checked DAO 3.6 to get round other problems and they seem to work. Help appreciated Pub...

Program trying to access Contacts
I did a clean install of WinXP and OfficeXP. I use Incredimail for Outlook and Spam Daemon for Outlook and have never had a problem with them. I also did an Office Update this morning. Now whenever I click "new" message, I got a window that says "a program is trying to access the contacts folder" and suggests it may be a virus and gives me an option to permit access but only for 1 to 5 minutes, as a select. What is causing this problem and how do I get rid of it? [I have Norton AV and Zonealarm installed, and they have never caused this problem.] Arthur Broadh...

ACCESS 2000 is deleting records
Just yesterday I converted an Access 97 database to Access 2000. Have a large problem I need help with. After converting the DB I "split it" in order to use it as a backend, same way it was in Access97. After converting the database to Access2k we began to have a problem with Access2k deleting records. it deleted a total of 4 out of 62 records. the records are not together ( record #289365 then 289048 then 289128 then 289178 then this morning 289405) these record are auto-numbered incerement of one. They were entered by different people so I know its not just an operator probl...

OE removed access to unsafe attachments #2
How do I tell Outlook Express to consider some attachments safe and let me open them? Anyone know? Tools-> Options-> tab Security-> uncheck Do not allow... Note that this is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here is the link for the right forum http://communities.microsoft.com/newsgroups/default.asp?icp=InternetExplorer Good Luck! -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft Office related News Also Outlook FAQ, How To's, Downloads and more... Tip of the month: -Create your o...

How do I filter rows based upon a column value
I have a spreadsheet that contains multiple agency id's in a column. When generating reports, I would like to filter per agency and display only the rows associated with that agency. Is there a tutorial or sample on how to do this? Hi It sounds like you are looking for Data / Filter / AutoFilter. Have a look here for some basics: http://www.contextures.com/xlautofilter01.html -- Andy. "Jack" <nfr@nospam.com> wrote in message news:eqiU08TVEHA.2988@TK2MSFTNGP10.phx.gbl... > I have a spreadsheet that contains multiple agency id's in a column. When > generati...

Outlook Web Access #34
I have a problem reading mails from Russia usig OWA ? (it is all a lot of ?????? and maybe numbers). If I use a normal Outlook client there are no problems ? I have triet different regional settings but no luck ? Try posting this in an Exchange news group as OWA is a function of Exchange, not Outlook. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Lost asked: | I h...

Comparing cell values then labeling them based on comparision
Hi. I'm trying to find a function or way to compare two cells and then label them according to if one cell is lesser, greater, or the same as the other. I have a large data sheet where I want to compare many pairs of cells and then have them labeled in this way. For example for each pair where the second cell value is larger than the first it would put greater, where the first is larger it would be lesser, etc. Can anybody help me with this? also feel free to email me at andrew@metiri.com. Thanks so much for your help. > Hi. I'm trying to find a function or way to compar...

Rich Text formatting in Access 2007
In Access 2007, is it possible to add rich text formatting to text in a memo field (or mixed formatting within any text field). I have just upgraded to the new version of Access, and it appears that this feature still has not been added. Is this correct? (If so, why?) If it is not possible to format individual words within a field in Access, , is there a simple, free add-in that will enable Access to do this kind of basic formatting, such as adding italic, bold, and underlining? Thanks very much for any information you may have. Bob Rich Text format for Memos in: Tables - Look in t...

BACKING UP ACCESS DATABASE 10-31-07
I'd like to backup my Access database automatically (no user intervention needed) to an external drive. Does Access allow such a backup while the database is "open" ? If I have to log out of Access, it defeats my purpose of wanting to do the backup without user intervention. There appear to be a number of drives and SW available to do the backup, but the question is whether Access will allow it. Basically I'd like to backup to the external drive every time a record is changed. I'm worried about losing my database if the PC crashes. If your database is that mission...

Random numbers, Canadian Zip Code style #2
Honestly, I don't even know where to begin -- Shocke ----------------------------------------------------------------------- Shocked's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1489 View this thread: http://www.excelforum.com/showthread.php?threadid=26523 ...

VBA Help in Access 2007
When looking through the Help engine, either local or online, I get blank pages when I look at many detail pages in the Help file. For example, when looking at most all web pages in ADO (Section I: ActiveX Data Objects (ADO), there's one title line and no detail. Is that planned behavior (no data) or is there some setting or site to find information? I'm specifically looking for handling records in a table (read, process, summarize). Thanks Terryomsn =?Utf-8?B?VGVycnk=?= <Terry@discussions.microsoft.com> wrote in news:04199121-0746-4A15-B201-03F13827D29C@microso...

CRM data access from external website
Hi All, I have a fully working CRM 3.0 solution on a dedicated server on my internal network. This server is also running SQL 2005 I have an externally hosted website on a Windows 2003 Server, located on the internet. I would like to be able to let some of my customers access to certain parts of my CRM solution, so that they can see the status of an order. I have developed a website on the external server that uses ASP.NET linked to my Internal SQL server and allows ASP registered users access to certain pages. On these pages I would like to use a table that shows the information that...

Serial Driver Code in C++
I am trying to send a string over serial RS-232 to another computer and wanted to use VC++. Is there some sample code/template I could follow ? It is not very complicated... just somethign that opens the port and writes into it.... and closes the port. Thanks -k On Wed, 13 Aug 2003 21:16:46 -0700, "KP" <drkcp@yahoo.com> wrote: >I am trying to send a string over serial RS-232 to another >computer and >wanted to use VC++. Is there some sample code/template I >could follow ? > >It is not very complicated... just somethign that opens >the port and ...

Delay Direct Push
Hi, Wonder if anyone face the same problem as i'm facing... Delay in receiving email at times.... 3 mins at times.... most often 1 min.... No matter if i'm on wireless or GPRS connection.... Can anyone advice? On Sat, 18 Nov 2006 23:39:57 +0800, "Gary Ng" <gary.ng@netplus-asia.com> wrote: >Hi, > >Wonder if anyone face the same problem as i'm facing... Delay in receiving >email at times.... 3 mins at times.... most often 1 min.... > >No matter if i'm on wireless or GPRS connection.... > >Can anyone advice? > What about the lo...

Sum of values in a form
Folks, I have read numerous threads on this topic, and understand that in order for my Sum() to work I need t ensure all references are made back to the Record Source. I have endeavoured to do this, but am still getting #Error. I am trying to Sum the revenue each tenant provides in a given date range, to give a total revenue figure. If the date range is a whole month, then the expression just takes the value of Rent PCM, and not Rent PCM * No. of Days, which would give some unusual results. My Expression looks like this: =Sum(Nz(IIf([Short Let]=-1,[Rent pcm],IIf(Day([Forms]...