Need Query or Macro to Update Form

  • Thread starter Thread starter Chris J.
  • Start date Start date
C

Chris J.

I have a form with two textboxes, both tied to field names in the table I am
using for the form. The two fields are GroupName1 and Groupname2. I need to
build a query or macro to run where if there is any text in Groupname2, to
transfer the text to a new record where the text from Groupname2 is now in
Groupname1 field. Please help!!!

Thanks.
 
I have an Access database set up to track files in our file room. I have a
table named Provider File Tracking Log. I have a form created based off of
this table. In the form, I have a field showing what the file name is
[Groupname1]. Each record displays the [Groupname1] with locations of where
the file is at with other fields filled out by team members through the
department. When a new file needs to be added to the form, a team member
will add a new record putting the file name in [Groupname2]. What I need
accomplished, is at the end of every day, for a query or macro to take all of
the records with file names in [Groupname2] and implement them into new
records where the file name would be in [Groupname1]. However, there are a
ton of fields that have blanks in [Groupname2] which we would not want to
implement into new records. We would want to transfer only the records that
have a name in [Groupname2].
 
I have an Access database set up to track files in our file room. I have a
table named Provider File Tracking Log. I have a form created based off of
this table. In the form, I have a field showing what the file name is
[Groupname1]. Each record displays the [Groupname1] with locations of where
the file is at with other fields filled out by team members through the
department. When a new file needs to be added to the form, a team member
will add a new record putting the file name in [Groupname2]. What I need
accomplished, is at the end of every day, for a query or macro to take all of
the records with file names in [Groupname2] and implement them into new
records where the file name would be in [Groupname1]. However, there are a
ton of fields that have blanks in [Groupname2] which we would not want to
implement into new records. We would want to transfer only the records that
have a name in [Groupname2].

Jeff Boyce said:
You've described "how" you want to solve a situation... but we have no idea
what situation this is supposed to solve!
More specific descriptions will probably lead to more specific suggestions.
Jeff Boyce
www.InformationFutures.net
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

It sounds like you need to run a two-step procedure. First step is to
do an Append query that identifies all the records in the table with
non-blank [Groupname2] fields and reorganize the other data in the
records into the appropriate fields. I'm not sure if you will have to
run a maketable query to make an intermediate table or if you can
append directly to the same table you run the query from.

Here is a sample of some SQL I have that looks through a table for
specific records (WHERE clause) and then uses the data from some
fields in the table and substitutes different data for other fields
and then APPENDS the result set into the destination table.

SELECT Games1.GameNumber AS GameID, Games1.MatchNumber AS MatchID,
"yes" AS IsBye, Null AS Moves, Null AS BoardPosition, Games1.Black AS
WhiteId, 1 AS WhiteScore, Null AS BlackId, Null AS BlackScore
FROM Games1
WHERE (((Games1.White)=51 Or (Games1.White)=50));

Once you have done this, you can run a DELETE query to delete all the
rows in the table where [GroupName2] is non-blank.

Doesn't sound too complex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top