command button coding.....

S

seema

Hello,
iam designing a databade, my requirement is that when i click a command
button it should delete a particular record from one form and move same
record to the other table in same fields...

iam confused about the VB coding here...

any help would be highly appreciated...

thanks
seemab
 
J

John W. Vinson

Hello,
iam designing a databade, my requirement is that when i click a command
button it should delete a particular record from one form and move same
record to the other table in same fields...

iam confused about the VB coding here...

any help would be highly appreciated...

thanks
seemab

Rather than talking about What first let's determine Why.

Having two tables with the same fields and the same structure, and moving
records from one table to another, is generally A Bad Idea. If you're trying
to archive records, it's simpler and more effective to have an indexed Yes/No
field Archived; just check it to archive a record, and use queries to display
only un-archived records, only archived records, or both as needed.

Why do you want to do this? What is the business purpose?

John W. Vinson [MVP]
 
S

seema

actually we are making LC record data base where we siply keep the records of
opened LCs in one table and in later time we make payments of some particular
LCs which we had opened previously...

i want to move opened LC record to the payment table to make a payment of
that particular LC and to keep a record of that payment...

thanks.
 
J

John W. Vinson

actually we are making LC record data base where we siply keep the records of
opened LCs in one table and in later time we make payments of some particular
LCs which we had opened previously...

i want to move opened LC record to the payment table to make a payment of
that particular LC and to keep a record of that payment...

What's a LC?

I would be inclined to treat a LC (whatever it is) as one type of entity, and
have a table recording all openings of LC's; and a payment as a different kind
of entity. Might one LC have multiple payments? Or might a single payment
apply to more than one LC?


John W. Vinson [MVP]
 
S

Seemab

Oh iam so sorry , actuaaly LC is a letter of credit and yes one LC can have a
multiple payments and it can have a single payment also...

actually my database is not confined to these two tables , there are some
other tables and some other requirements as well, as iam new in access so iam
just going step by step and trying to solve my requirements and querries at
this stage and later will design my complete database and i am sure, i will
do that successfully just i need is to have some guidance from you people..

thanks
 
J

John W. Vinson

Oh iam so sorry , actuaaly LC is a letter of credit and yes one LC can have a
multiple payments and it can have a single payment also...

Ok; might one payment apply to many letters of credit? If so you have a "many
to many" relationship. If each payment applies to only one LC then it's a "one
to many".
actually my database is not confined to these two tables , there are some
other tables and some other requirements as well,

Well, sure, I would expect that to be the case (two tables is pretty trivial).
as iam new in access so iam
just going step by step and trying to solve my requirements and querries at
this stage and later will design my complete database and i am sure, i will
do that successfully just i need is to have some guidance from you people..

See the tutorials at

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

for some basic database design tips. Crystal's tutorial might be a good place
to start.

John W. Vinson [MVP]
 

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

Top