PC Review


Reply
Thread Tools Rate Thread

Assign default value, allow user to overwrite and update query

 
 
=?Utf-8?B?RWxsZXZl?=
Guest
Posts: n/a
 
      17th Feb 2006
I wish to assign a default value to a text box and allow the user to
overwrite it. The default value is taken from a query field. I have a
continuous form and I want the user to be able to change only one field.
Then the total should be automatically updated.

Basically, I want the user to edit the information and then update the total
in the query. If the user makes changes, store/update the amount in the
query, else keep the default value set in the query. I thought I could do
something like this in the afterupdate event:

Me![txtApproved] = {what the user entered?}

How do I go about setting this up?
 
Reply With Quote
 
 
 
 
tina
Guest
Posts: n/a
 
      17th Feb 2006
> Basically, I want the user to edit the information and then update the
total
> in the query. If the user makes changes, store/update the amount in the
> query, else keep the default value set in the query.


you can't "store" or "update" data in a query. queries don't hold or store
data; tables do. can you explain a little more clearly what you're trying to
accomplish? such as, "my form is bound to table such-and-such. it has a
(bound? unbound?) textbox. i retrieve a value (from a DLookup() function?)
to use as the default value. if the user changes the default, what i want to
happen is..."
if we can understand better what you're trying to do, probably we can help
you figure out a way to do it.

hth


"Elleve" <(E-Mail Removed)> wrote in message
news:CE04BEC5-E952-4B68-89F5-(E-Mail Removed)...
> I wish to assign a default value to a text box and allow the user to
> overwrite it. The default value is taken from a query field. I have a
> continuous form and I want the user to be able to change only one field.
> Then the total should be automatically updated.
>
> Basically, I want the user to edit the information and then update the

total
> in the query. If the user makes changes, store/update the amount in the
> query, else keep the default value set in the query. I thought I could do
> something like this in the afterupdate event:
>
> Me![txtApproved] = {what the user entered?}
>
> How do I go about setting this up?



 
Reply With Quote
 
=?Utf-8?B?RWxsZXZl?=
Guest
Posts: n/a
 
      17th Feb 2006
It is a little bit complicated, but here we go. "Table1" is used in query
"Query1" with the column 'Amount' as the important one. "Query1" is a
complicated query that is based on several other queries, based on the same
table. The only reason for this complication is because of some criterias I
need. Basically I end up with two queries that I union together in "Query1".
These two queries do exactly the same, but with different criterias. It has
three columns added/"calculated" where the last two are the same as 'Amount',
but are 0 or the amount based a criteria from one of the fields. Also, these
two queries have criterias from listbox and comboboxes. The form I use is
linked to "Query1" and I put the values to bound. However, the field I want
to be able to edit called 'Approved' was set to unbound and then default =
'Approved'. I was able to change the values, but it changed the values of
all the fields instead of only that field. The reason I wanted to keep the
changes made by the user is because I wanted this to be used in another form
to calculate the total of part of these numbers. Basically, there is about
18 records in this forms that the user will need to check all the individual
fields in each record for and make the changes he/she wants. The totals in
each 18 records will then be used in another form that contains 3 records
(continuous form). However, I am exporting this form to excel and might be
able to have the user manually make the changes, total it, and then import it
back to the database. But this seems to be more complicated. I want to have
everything automated for simplicity.

"tina" wrote:

> > Basically, I want the user to edit the information and then update the

> total
> > in the query. If the user makes changes, store/update the amount in the
> > query, else keep the default value set in the query.

>
> you can't "store" or "update" data in a query. queries don't hold or store
> data; tables do. can you explain a little more clearly what you're trying to
> accomplish? such as, "my form is bound to table such-and-such. it has a
> (bound? unbound?) textbox. i retrieve a value (from a DLookup() function?)
> to use as the default value. if the user changes the default, what i want to
> happen is..."
> if we can understand better what you're trying to do, probably we can help
> you figure out a way to do it.
>
> hth
>
>
> "Elleve" <(E-Mail Removed)> wrote in message
> news:CE04BEC5-E952-4B68-89F5-(E-Mail Removed)...
> > I wish to assign a default value to a text box and allow the user to
> > overwrite it. The default value is taken from a query field. I have a
> > continuous form and I want the user to be able to change only one field.
> > Then the total should be automatically updated.
> >
> > Basically, I want the user to edit the information and then update the

> total
> > in the query. If the user makes changes, store/update the amount in the
> > query, else keep the default value set in the query. I thought I could do
> > something like this in the afterupdate event:
> >
> > Me![txtApproved] = {what the user entered?}
> >
> > How do I go about setting this up?

>
>
>

 
Reply With Quote
 
=?Utf-8?B?RWxsZXZl?=
Guest
Posts: n/a
 
      17th Feb 2006
If possible, I can have the user edit the amount in 'Approved', recalculate
the total, and save the value in the total. I am basically just going to use
the total amount in the further calculations. Hope this helps in making it
work!

"tina" wrote:

> > Basically, I want the user to edit the information and then update the

> total
> > in the query. If the user makes changes, store/update the amount in the
> > query, else keep the default value set in the query.

>
> you can't "store" or "update" data in a query. queries don't hold or store
> data; tables do. can you explain a little more clearly what you're trying to
> accomplish? such as, "my form is bound to table such-and-such. it has a
> (bound? unbound?) textbox. i retrieve a value (from a DLookup() function?)
> to use as the default value. if the user changes the default, what i want to
> happen is..."
> if we can understand better what you're trying to do, probably we can help
> you figure out a way to do it.
>
> hth
>
>
> "Elleve" <(E-Mail Removed)> wrote in message
> news:CE04BEC5-E952-4B68-89F5-(E-Mail Removed)...
> > I wish to assign a default value to a text box and allow the user to
> > overwrite it. The default value is taken from a query field. I have a
> > continuous form and I want the user to be able to change only one field.
> > Then the total should be automatically updated.
> >
> > Basically, I want the user to edit the information and then update the

> total
> > in the query. If the user makes changes, store/update the amount in the
> > query, else keep the default value set in the query. I thought I could do
> > something like this in the afterupdate event:
> >
> > Me![txtApproved] = {what the user entered?}
> >
> > How do I go about setting this up?

>
>
>

 
Reply With Quote
 
tina
Guest
Posts: n/a
 
      17th Feb 2006
well, i'm afraid you've stumped me; perhaps somebody else will be able to
offer a solution. good luck.


"Elleve" <(E-Mail Removed)> wrote in message
news:B4D010A8-38F7-41DE-B639-(E-Mail Removed)...
> It is a little bit complicated, but here we go. "Table1" is used in query
> "Query1" with the column 'Amount' as the important one. "Query1" is a
> complicated query that is based on several other queries, based on the

same
> table. The only reason for this complication is because of some criterias

I
> need. Basically I end up with two queries that I union together in

"Query1".
> These two queries do exactly the same, but with different criterias. It

has
> three columns added/"calculated" where the last two are the same as

'Amount',
> but are 0 or the amount based a criteria from one of the fields. Also,

these
> two queries have criterias from listbox and comboboxes. The form I use is
> linked to "Query1" and I put the values to bound. However, the field I

want
> to be able to edit called 'Approved' was set to unbound and then default =
> 'Approved'. I was able to change the values, but it changed the values of
> all the fields instead of only that field. The reason I wanted to keep

the
> changes made by the user is because I wanted this to be used in another

form
> to calculate the total of part of these numbers. Basically, there is

about
> 18 records in this forms that the user will need to check all the

individual
> fields in each record for and make the changes he/she wants. The totals

in
> each 18 records will then be used in another form that contains 3 records
> (continuous form). However, I am exporting this form to excel and might

be
> able to have the user manually make the changes, total it, and then import

it
> back to the database. But this seems to be more complicated. I want to

have
> everything automated for simplicity.
>
> "tina" wrote:
>
> > > Basically, I want the user to edit the information and then update the

> > total
> > > in the query. If the user makes changes, store/update the amount in

the
> > > query, else keep the default value set in the query.

> >
> > you can't "store" or "update" data in a query. queries don't hold or

store
> > data; tables do. can you explain a little more clearly what you're

trying to
> > accomplish? such as, "my form is bound to table such-and-such. it has a
> > (bound? unbound?) textbox. i retrieve a value (from a DLookup()

function?)
> > to use as the default value. if the user changes the default, what i

want to
> > happen is..."
> > if we can understand better what you're trying to do, probably we can

help
> > you figure out a way to do it.
> >
> > hth
> >
> >
> > "Elleve" <(E-Mail Removed)> wrote in message
> > news:CE04BEC5-E952-4B68-89F5-(E-Mail Removed)...
> > > I wish to assign a default value to a text box and allow the user to
> > > overwrite it. The default value is taken from a query field. I have

a
> > > continuous form and I want the user to be able to change only one

field.
> > > Then the total should be automatically updated.
> > >
> > > Basically, I want the user to edit the information and then update the

> > total
> > > in the query. If the user makes changes, store/update the amount in

the
> > > query, else keep the default value set in the query. I thought I could

do
> > > something like this in the afterupdate event:
> > >
> > > Me![txtApproved] = {what the user entered?}
> > >
> > > How do I go about setting this up?

> >
> >
> >



 
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: Update Query to Overwrite Old Data Automatically Dale Fye Microsoft Access Queries 1 16th Mar 2009 04:45 PM
Complicated: Having user overwrite default value and keep total va =?Utf-8?B?RWxsZXZl?= Microsoft Access Forms 2 17th Feb 2006 09:14 PM
Assign default mapped drive for new user boaz Windows XP Help 1 30th Oct 2004 06:04 PM
Assign default user directories Sandra Grawunder Windows XP Networking 2 23rd Apr 2004 07:46 PM
Update Query Overwrite? Brandon M Microsoft Access Queries 12 25th Feb 2004 12:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.