PC Review


Reply
Thread Tools Rate Thread

Add new records ind a locked form with locked subforms!

 
 
=?Utf-8?B?VG9iaWFz?=
Guest
Posts: n/a
 
      19th Jun 2007
Can anyone please help me with the following:

I have a Form with multiplies of subforms witch are related by relations.
It is possible for the user to enter the form and change a specific record
by selecting the specific form from a kombolist witch refers to the list of
ID’s from my main table.
The Form is for good reasons locked so that the user not by mistake, can add
new records when he is changing in an existent record, just by scrolling down.

I now want to be able to add new records to the database by typing in a new
ID, but here comes the problem.
I tried by SQL to “insert into” my main table and by that it should update
my other related tables, but it doesn’t.
I also tried manually to enter a record in my main table, but it doesn’t add
the same entered ID to my other tables. This results in my subforms to be
“invisible” or blank when I enter my mainform with the new entered ID.
Is there a SQL-code that inserts a value from a txt-box in many tables at
one time, so that access don’t give me an error due to my relations of tables
or can I delete my relations and hardcode an insert-statement to all of my
tables at ones?

Best regards Tobias

 
Reply With Quote
 
 
 
 
Steve
Guest
Posts: n/a
 
      19th Jun 2007
You don't need to lock your form to prevent adding new records. Just set the
AllowAdditions property for the form to No and you won't get that new record
line at the bottom of your form. When you want to add a new record, use the
following code in some event:
Me.AllowAdditions = True

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(E-Mail Removed)






"Tobias" <(E-Mail Removed)> wrote in message
newsDDCD6A3-716F-43A4-90BF-(E-Mail Removed)...
> Can anyone please help me with the following:
>
> I have a Form with multiplies of subforms witch are related by relations.
> It is possible for the user to enter the form and change a specific record
> by selecting the specific form from a kombolist witch refers to the list
> of
> ID's from my main table.
> The Form is for good reasons locked so that the user not by mistake, can
> add
> new records when he is changing in an existent record, just by scrolling
> down.
>
> I now want to be able to add new records to the database by typing in a
> new
> ID, but here comes the problem.
> I tried by SQL to "insert into" my main table and by that it should update
> my other related tables, but it doesn't.
> I also tried manually to enter a record in my main table, but it doesn't
> add
> the same entered ID to my other tables. This results in my subforms to be
> "invisible" or blank when I enter my mainform with the new entered ID.
> Is there a SQL-code that inserts a value from a txt-box in many tables at
> one time, so that access don't give me an error due to my relations of
> tables
> or can I delete my relations and hardcode an insert-statement to all of my
> tables at ones?
>
> Best regards Tobias
>



 
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
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Microsoft Excel Misc 1 10th Jul 2009 09:42 PM
Form has data locked - All settings set to "not locked" BlueWolverine Microsoft Access Forms 6 6th Oct 2008 07:12 PM
Subforms being locked =?Utf-8?B?SmFtaWUgRmVsbHJhdGg=?= Microsoft Access Form Coding 4 13th Jun 2005 02:11 PM
locked form section, next section header locked too =?Utf-8?B?R2VyeSBDLiBGcnlucw==?= Microsoft Word Document Management 8 17th Nov 2004 09:36 PM
Entering Data in Subforms w/ Main form locked rgrantz Microsoft Access Forms 0 11th Nov 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 AM.