'与上述地址相同'勾选框 [英] 'Same as above address' Tick box

查看:90
本文介绍了'与上述地址相同'勾选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有字段的表单:地址,郊区,州,Pcode(用于

位置地址)然后:PAddress,PSuburb,PState,PPcode(用于

邮政地址)。


当邮政地址与地址相同时,重新输入/复制地址会变得很麻烦进入邮政地址字段所以

我创建了一个勾选框(就像''相同'上面''thingy)在哪里

''afterupdate''我已经将以下代码作为事件过程:


Private Sub Same_As_Above_AfterUpdate()

[PAddress] = [地址]

[ PSuburb] = [郊区]

[PState] = [州]

[PPcode] = [Pcode]

End Sub


这里显而易见的问题是它更新了所有4个邮政地址字段

你打勾或取消勾选方框。


什么代码我需要插入(或从头创建)告诉它

只更新4邮政地址s字段_when_the_box_is_ticked_?

此外,如果该框在以后被取消,那么有一些代码可以告诉它清除4

字段。 br />

任何帮助将不胜感激!!


谢谢

Farqs

I''ve got a form with feilds: Address, Suburb, State, Pcode (for the
Location Addres) and then: PAddress, PSuburb, PState, PPcode (for the
Postal Address).

When the postal address is the same as the location address, it becomes
cumbersome to retype/copy the address into the postal address fields so
I created a tick box (like a ''same as above'' thingy) where on
''afterupdate'' i''ve put the following code as an Event Procedure:

Private Sub Same_As_Above_AfterUpdate()
[PAddress] = [Address]
[PSuburb] = [Suburb]
[PState] = [State]
[PPcode] = [Pcode]
End Sub

The obvious problem here is that it updates all 4 postal address fields
wether you tick or untick the box.

What code do i need to insert (or create from scratch) to tell it to
only update the 4 postal address fields _when_the_box_is_ticked_?
Also, it would be nice to have some code that tells it to clear the 4
fields if the box is ''unticked'' later.

Any help would be appreciated!!

Thanks
Farqs

推荐答案

farqs< mf ***** @ yahoo.com.au>写道:
farqs <mf*****@yahoo.com.au> wrote:
我有一个带有字段的表单:地址,郊区,州,Pcode(用于
位置地址)然后:PAddress,PSuburb,PState,PPcode(用于
邮政地址。

当邮政地址与地址相同时,将地址重新输入/复制到邮政地址
变得很麻烦
所以我创建了一个勾选框(就像上面的''相同'),其中
on''afterupdate''我把以下代码作为一个事件程序:

Private Sub Same_As_Above_AfterUpdate()
[PAddress] = [地址]
[PSuburb] = [郊区]
[PState] = [州]
[PPcode] = [Pcode] <结束Sub

这里显而易见的问题是,它会更新所有4个邮政地址
字段,而不是勾选或取消选中框。

我的代码是什么需要插入(或从头创建)告诉它
只更新4个邮政地址字段_when_the_box_is_ticked_?
另外,我如果有一些代码可以告诉它清除4
字段,如果这个盒子在以后被取消,那将是很好的。

任何帮助都将不胜感激!!

谢谢
Farqs
I''ve got a form with feilds: Address, Suburb, State, Pcode (for the
Location Addres) and then: PAddress, PSuburb, PState, PPcode (for the
Postal Address).

When the postal address is the same as the location address, it
becomes cumbersome to retype/copy the address into the postal address
fields so I created a tick box (like a ''same as above'' thingy) where
on ''afterupdate'' i''ve put the following code as an Event Procedure:

Private Sub Same_As_Above_AfterUpdate()
[PAddress] = [Address]
[PSuburb] = [Suburb]
[PState] = [State]
[PPcode] = [Pcode]
End Sub

The obvious problem here is that it updates all 4 postal address
fields wether you tick or untick the box.

What code do i need to insert (or create from scratch) to tell it to
only update the 4 postal address fields _when_the_box_is_ticked_?
Also, it would be nice to have some code that tells it to clear the 4
fields if the box is ''unticked'' later.

Any help would be appreciated!!

Thanks
Farqs




嗯,简单.....


Private Sub Same_As_Above_AfterUpdate( )

如果我![Same_As_Above]那么

我![PAddress] =我![地址]

我![PSuburb] =我![郊区]

我![PState] =我![状态]

我![PPcode] =我![Pcode]

否则

我![PAddress] = Null

我![PSuburb] = Null

我![PState] = Null

我![PPcode] = Null

结束如果

结束子


-

问候,


布拉德利


基督徒的回应
http://www.pastornet.net.au/response


。 ......我只是想到了其他的东西......


它很糟糕如果你在邮政地址已输入时勾选方框

,如果发出警告,那就好了,但是与

位置地址不同。 (如果某人的邮寄地址更改为

他们的位置地址(由于某种原因),以后会更有用)


干杯

Farqs

.... and i just thought of something else...

It would be nice if a warning popped up if you were to tick the box
when the postal address is already typed in, BUT is different to the
location address. (useful for if someones postal address changes to
their location address (for some reason), at a later date)

Cheers
Farqs


你是布拉德利的传奇!就像魅力一样。


干杯

Farqs

You''re a legend Bradley!! Works like a charm.

Cheers
Farqs


这篇关于'与上述地址相同'勾选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆