A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

locking data



 
 
Thread Tools Display Modes
  #1  
Old June 18th, 2007, 09:54 PM posted to microsoft.public.access.tablesdbdesign
Alan
external usenet poster
 
Posts: 459
Default locking data

Hi folks,

I have a database that pulls pricing data over from an AS400 for quotes. I
want to be able to lock that data once the quote is accepted as the link to
the pricing file is live so if a price change occurs, it will change the
quotes themselves which I don't want.

Is there a way of doing this without having to move data to another table?
I'd like to be able to keep current and old records together for analysis
purposes.

Thanks,

Al
  #2  
Old June 19th, 2007, 12:20 PM posted to microsoft.public.access.tablesdbdesign
OTWarrior via AccessMonster.com
external usenet poster
 
Posts: 10
Default locking data

Alan wrote:
Hi folks,

I have a database that pulls pricing data over from an AS400 for quotes. I
want to be able to lock that data once the quote is accepted as the link to
the pricing file is live so if a price change occurs, it will change the
quotes themselves which I don't want.

Is there a way of doing this without having to move data to another table?
I'd like to be able to keep current and old records together for analysis
purposes.


Depends on how you have a quote accepted on your system. If you are using a
checkbox to confirm the quote, then something like

if checkbox = true then
txtQuote.enabled = false
end if

that is if you want to lock just that one box. if you want to lock the whole
form, then I would go with:

me.AllowEdits = false

and the only way i know of keeping old and current records together would be
to have multiple fields (if you want to keep it on the same table), and test
to see if the field has a value in it, otherwise enter the data into the
other field.

IIf(Nz(Me.quote) = "", me.txtquote1.visible = true, (me.txtquote1.visible =
false) & (me.txtquote2.visible = true))

hope that helps

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200706/1

  #3  
Old June 20th, 2007, 03:48 PM posted to microsoft.public.access.tablesdbdesign
Alan
external usenet poster
 
Posts: 459
Default locking data

Thanks for replying and the suggestions. I'd like to lock the all the data
related to that quote so the main form and all the subforms. I'll try your
second suggestion. I did think about the passing data to a second field to
lock but wasn't sure if that was the best way to do it as it essentiallys
doubles the number of fields I'm dealing with. I'll play around with it
though and see how it works.

Thanks again for the suggestions.

Alan

"OTWarrior via AccessMonster.com" wrote:

Alan wrote:
Hi folks,

I have a database that pulls pricing data over from an AS400 for quotes. I
want to be able to lock that data once the quote is accepted as the link to
the pricing file is live so if a price change occurs, it will change the
quotes themselves which I don't want.

Is there a way of doing this without having to move data to another table?
I'd like to be able to keep current and old records together for analysis
purposes.


Depends on how you have a quote accepted on your system. If you are using a
checkbox to confirm the quote, then something like

if checkbox = true then
txtQuote.enabled = false
end if

that is if you want to lock just that one box. if you want to lock the whole
form, then I would go with:

me.AllowEdits = false

and the only way i know of keeping old and current records together would be
to have multiple fields (if you want to keep it on the same table), and test
to see if the field has a value in it, otherwise enter the data into the
other field.

IIf(Nz(Me.quote) = "", me.txtquote1.visible = true, (me.txtquote1.visible =
false) & (me.txtquote2.visible = true))

hope that helps

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200706/1


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.