473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Allow Additions on Sub-form

I'm trying to create the following:

When a user opens a form, if the form's Sub-form has a record, then
they have to click a command button in order to add a new record. If
the Sub-form does not have a record, then a new record in that sub-
form is shown. Actually it doesn't even matter if a new record is
shown. Thye can still click the command button to add a record. I
just don't know how to identify that sub-form in the On Click Event of
the Main Form if the command button is on the main form.

Thanks for the help!

Chris

Feb 5 '07 #1
1 2957
I figured it out.
Me.SubFormName.Form.Allow Additions = False

On Feb 5, 10:33 am, "chris" <chrisvett...@yahoo.comwrote:
I'm trying to create the following:

When a user opens a form, if the form's Sub-form has a record, then
they have to click a command button in order to add a new record. If
the Sub-form does not have a record, then a new record in that sub-
form is shown. Actually it doesn't even matter if a new record is
shown. Thye can still click the command button to add a record. I
just don't know how to identify that sub-form in the On Click Event of
the Main Form if the command button is on the main form.

Thanks for the help!

Chris

Feb 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Horoschak | last post by:
I am looking for some additions to a Perl-based auction script. I need to set up a system that allows buyers and sellers to e-mail each other without sharing their contact information. This will...
4
by: Karen Sundquist | last post by:
I have a client who wants to build a database with a user extensible schema. The client wants to model an entity with about 100 numeric attributes. As time goes on, more numeric attributes will...
29
by: C A Upsdell | last post by:
Comments re these three related, proposed CSS 3 additions? 1. Add 'text-transform:time', which would transform text in the format hours:minutes:seconds (24 hour clock) to the local format for...
2
by: bhooper | last post by:
Does anyone know how I can allow updates to a datagrid while hiding the insert row that appears as the last row in the datgrid control? I want users to be able to update select columns for...
3
by: Joćo Araśjo | last post by:
Hello all, I'm a VB6 programmer, and I'm starting to change basic functions to .NET. I've seen an example on how to allow only digits on a textbox control, using the Edit Control Styles on a...
4
by: fniles | last post by:
I have an ActiveX control in my web page that I tried to access using intranet. I have implemented IObjectSafety in the ActiveX control, and when I created the CAB file using VB Pakage and...
10
by: Michel Rouzic | last post by:
I need to determine how long does an addition take and how long does a multiplication takes. So far I've been trying to use the clock() function in my programs in order to find out how long it took...
4
by: Bob Homes | last post by:
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to each menu item; that way, you could rest the cursor on the item (without actually running it) and then press F1 to get...
2
by: aston martin | last post by:
Hello, I am new to this forum and new to Visual Basic. I need someone to point me in the right direction. I have been asked to write a spreadsheet (which I have done) and then use a macro which...
2
by: jaredciagar | last post by:
Hi Guys, Please Help ME.... I have a problem in displaying data in my gridview with paging, the data from the database is displaying to my gridview but I want to allow paging in my gridview.how can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.