Can't add new record to form

I have 2 tables that are linked.  One table holds the Main Data - a 
collection of cost totals, the second holds additional data about one of the 
items (a breakdown of one of the cost totals) from the Main Data.  

I created the main form, then I created the second form and used a command 
button to open the second form.  On historical data this worked perfect.  

Now I tried to add a new record starting with the main form.  When I hit the 
command button to open the linked form, the form would not open.  After that, 
I then realized that I can't even open the second form by itself and add a 
new record - the button is "grayed" out.  I can still open the table and add 
a new record, but not using the form.

So, I actually have 2 problems.  
I cannot add a new record to the second form I created.  
When I add a new record to the main form, I need the linked form to open in 
"add" mode for new records, but for existing records, I need it to open to 
the current linked record.

Unfortunately, I don't know how to use code - so if that is my solution, 
I'll need the "dummies" version on exactly how to do this, if anyone is 
willing to put in the effort to explain it to me.

Thanks for the help - this website has helped me through a lot of obstacles 
in the design of this db!

-- 
JackieM
0
Utf
12/12/2007 9:08:00 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
2103 Views

Similar Articles

[PageSpeed] 52

If I follow it appears as though you have a table with a one-to-many 
relationship between records stored in that table and records stored in a 
second table.  In other words for every record in your main table there may 
be a number of records in your second table.  If that's the case, instead of 
the button, you might try playing with a subform command tool.  the subform 
will allow you to place your second form right on the first form and maintain 
the link between them (regardless of whether this is a new record or an old 
record).

To illustrate, if the main table contains a list of teachers:

John
Jane
Bob

and the second table contains a list of the student initials in each 
teacher's class:

John has AB, DS, CF, GD, KA
Jane has RT, PP, SM, NT
Bob has ML, RF, BC

a form with a subform would show Jane in the form and RT, PP, SM, and NT in 
the subform. Does that make sense?  I'm happy to help further. Let me know.


"JackieM" wrote:

> I have 2 tables that are linked.  One table holds the Main Data - a 
> collection of cost totals, the second holds additional data about one of the 
> items (a breakdown of one of the cost totals) from the Main Data.  
> 
> I created the main form, then I created the second form and used a command 
> button to open the second form.  On historical data this worked perfect.  
> 
> Now I tried to add a new record starting with the main form.  When I hit the 
> command button to open the linked form, the form would not open.  After that, 
> I then realized that I can't even open the second form by itself and add a 
> new record - the button is "grayed" out.  I can still open the table and add 
> a new record, but not using the form.
> 
> So, I actually have 2 problems.  
> I cannot add a new record to the second form I created.  
> When I add a new record to the main form, I need the linked form to open in 
> "add" mode for new records, but for existing records, I need it to open to 
> the current linked record.
> 
> Unfortunately, I don't know how to use code - so if that is my solution, 
> I'll need the "dummies" version on exactly how to do this, if anyone is 
> willing to put in the effort to explain it to me.
> 
> Thanks for the help - this website has helped me through a lot of obstacles 
> in the design of this db!
> 
> -- 
> JackieM
0
Utf
12/12/2007 9:39:02 PM
Thank you for your time in responding to me.  I have used subforms before, 
but in this instance it would be too much on one screen - I have about 5 of 
these linked forms.  So is it possible for this to work properly the way I am 
trying to do this?  

The relationships between the tables are actually set up as one to one.  We 
have one unique job number - I'm using this as the linked field.  The main 
form holds the totals for all costs on the job.  The "linked" forms are 
breakdowns of 5 of the major costs.  

Is it possible that because the relationship is one-to-one, that is why I 
cannot add a new record in the linked table?

Please don't tell me I set this all up incorrectly.  I thought I was getting 
very near to completion on this database!
-- 
JackieM


"ArielZusya" wrote:

> If I follow it appears as though you have a table with a one-to-many 
> relationship between records stored in that table and records stored in a 
> second table.  In other words for every record in your main table there may 
> be a number of records in your second table.  If that's the case, instead of 
> the button, you might try playing with a subform command tool.  the subform 
> will allow you to place your second form right on the first form and maintain 
> the link between them (regardless of whether this is a new record or an old 
> record).
> 
> To illustrate, if the main table contains a list of teachers:
> 
> John
> Jane
> Bob
> 
> and the second table contains a list of the student initials in each 
> teacher's class:
> 
> John has AB, DS, CF, GD, KA
> Jane has RT, PP, SM, NT
> Bob has ML, RF, BC
> 
> a form with a subform would show Jane in the form and RT, PP, SM, and NT in 
> the subform. Does that make sense?  I'm happy to help further. Let me know.
> 
> 
> "JackieM" wrote:
> 
> > I have 2 tables that are linked.  One table holds the Main Data - a 
> > collection of cost totals, the second holds additional data about one of the 
> > items (a breakdown of one of the cost totals) from the Main Data.  
> > 
> > I created the main form, then I created the second form and used a command 
> > button to open the second form.  On historical data this worked perfect.  
> > 
> > Now I tried to add a new record starting with the main form.  When I hit the 
> > command button to open the linked form, the form would not open.  After that, 
> > I then realized that I can't even open the second form by itself and add a 
> > new record - the button is "grayed" out.  I can still open the table and add 
> > a new record, but not using the form.
> > 
> > So, I actually have 2 problems.  
> > I cannot add a new record to the second form I created.  
> > When I add a new record to the main form, I need the linked form to open in 
> > "add" mode for new records, but for existing records, I need it to open to 
> > the current linked record.
> > 
> > Unfortunately, I don't know how to use code - so if that is my solution, 
> > I'll need the "dummies" version on exactly how to do this, if anyone is 
> > willing to put in the effort to explain it to me.
> > 
> > Thanks for the help - this website has helped me through a lot of obstacles 
> > in the design of this db!
> > 
> > -- 
> > JackieM
0
Utf
12/13/2007 12:42:00 PM
Maybe this will help:

Private Sub Open_DBMat_Click()
On Error GoTo Err_Open_DBMat_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Database Materials"
    
    stLinkCriteria = "[Database Materials_Proposal #]=" & "'" & Me![Proposal 
#] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Open_DBMat_Click:
    Exit Sub

Err_Open_DBMat_Click:
    MsgBox Err.Description
    Resume Exit_Open_DBMat_Click
    
End Sub

I think all I need is a command line that says if there is no matching 
record, go to add a new record.  But being that I have never written code, I 
have no idea what to write, where to write it, etc.

Thank you for anyone will to put in the time to help me!

-- 
JackieM


"ArielZusya" wrote:

> If I follow it appears as though you have a table with a one-to-many 
> relationship between records stored in that table and records stored in a 
> second table.  In other words for every record in your main table there may 
> be a number of records in your second table.  If that's the case, instead of 
> the button, you might try playing with a subform command tool.  the subform 
> will allow you to place your second form right on the first form and maintain 
> the link between them (regardless of whether this is a new record or an old 
> record).
> 
> To illustrate, if the main table contains a list of teachers:
> 
> John
> Jane
> Bob
> 
> and the second table contains a list of the student initials in each 
> teacher's class:
> 
> John has AB, DS, CF, GD, KA
> Jane has RT, PP, SM, NT
> Bob has ML, RF, BC
> 
> a form with a subform would show Jane in the form and RT, PP, SM, and NT in 
> the subform. Does that make sense?  I'm happy to help further. Let me know.
> 
> 
> "JackieM" wrote:
> 
> > I have 2 tables that are linked.  One table holds the Main Data - a 
> > collection of cost totals, the second holds additional data about one of the 
> > items (a breakdown of one of the cost totals) from the Main Data.  
> > 
> > I created the main form, then I created the second form and used a command 
> > button to open the second form.  On historical data this worked perfect.  
> > 
> > Now I tried to add a new record starting with the main form.  When I hit the 
> > command button to open the linked form, the form would not open.  After that, 
> > I then realized that I can't even open the second form by itself and add a 
> > new record - the button is "grayed" out.  I can still open the table and add 
> > a new record, but not using the form.
> > 
> > So, I actually have 2 problems.  
> > I cannot add a new record to the second form I created.  
> > When I add a new record to the main form, I need the linked form to open in 
> > "add" mode for new records, but for existing records, I need it to open to 
> > the current linked record.
> > 
> > Unfortunately, I don't know how to use code - so if that is my solution, 
> > I'll need the "dummies" version on exactly how to do this, if anyone is 
> > willing to put in the effort to explain it to me.
> > 
> > Thanks for the help - this website has helped me through a lot of obstacles 
> > in the design of this db!
> > 
> > -- 
> > JackieM
0
Utf
12/13/2007 1:07:01 PM
Reply:

Similar Artilces:

Add Lookup Fields to Entity
I need to add 4 "technical contact" fields (which would lookup the Contact entity) to the CONTRACT form. Is this possible? I've found it difficult to figure out what to do first. Thanks in advance, Brandon Not possible. You cant have multiple lookups for the same entity. You also cannot create new relationships between two system entitites. This will work in 4.0 Not possible, Pezman. N:M relationships are not possible in 3.0 yet. There is a alternative solution: a new entity to act as an N:M relationship. In your case, Contract/Contact. This entity has two 1:N relations...

Record Deleted
I am attempting to write a simple query and when I choose the information in ascending order I am receiving an error message that states a record has been deleted and will not provide the report. I'm finding that I'm receiving this message on several already created queries. How can I correct this without losing information? The only change has been the relocation of the file to another folder. Are you talking about the main .mdb file that's been moved? Is the database split? If so, have you relinked the tables after moving the file? Do you have full permissions to the fol...

form cell question in Ver2000
I have a large sheet with email addresses in a column that only displays "yes" with the letters in a gray shaded area. When I hover over the cell the underlying email address becomes visible. I need to find a way to create a column of the email addresses. Any help will be appreciated. James It sounds like someone added hyperlinks to your worksheet. If you select the cell and do Insert|Hyperlink, do you see the email address in a nice dialog? If yes, you can use a user defined function to extract that link (including email address). Saved from a previous post: One way to e...

Excel Add Ins
What is the name of the template wizard with Data Tracking (Excel. I can not locate the add in template wizard with Data Tracking in Office 2003 Hi Richard You are not the only one<g> The Add-in is working in 2003 only the install file is not working. Copy the xla file from a PC with 2002 to the PC with 2003 and it will work(use Tools>add-ins to browse to the file in Excel) -- Regards Ron de Bruin http://www.rondebruin.nl "Richard" <Richard@discussions.microsoft.com> wrote in message news:193C5DFD-578D-48F7-B9D6-9FEF5BDCEB64@microsoft.com... > What is t...

Opening new Excel window
Windows 2000. When have an exel already open, when I click on another excel file (or its shortcut) it opens into the same excel main window. Then I can view either one of the excel applications by selecting the appropriate window. Is there a setting such that new excel will open in its own window? If so, how? [Currently I can get this effect in a less convenient way by starting the excel directly the second time, and then reading in the excel file.] Alan Beban You could have one instance of excel open and have multiple "tasks" appearing on the taskbar via: Tools|optio...

Add on
Hello, Here is a scenerio. A client is buying 1lb of ham. It is put on a waxed paper then wrapped into a white paper and then put into a shopping bag. The usage of shopping bag is 100% cases the usage of paper is only with certin categories of sales. Same with the waxed paper. Question: Is there a way of associating wax paper, white paper and shopping bags in a way so with every sale a piece of paper gets deducted from inventory and one bag is deducted from inventory? I would like to run a report every so often and see if I need to purchase any supplies. Kits and assembly do not work...

Calling Forms
Usually when i write a Visual C++ program i use Dialogs insted of Forms. When i want to call a dialog i use the Dialog.DoModal(), but how can i call a Form? Ricardo Furtado wrote: > Usually when i write a Visual C++ program i use Dialogs insted of Forms. When > i want to call a dialog i use the Dialog.DoModal(), but how can i call a > Form? > If you have a document/view app, what is usually done is to switch the view from one formview to another, within the same frame window. Sample code is shown at: http://support.microsoft.com/default.aspx?scid=kb;en-us;141334 -- ...

add a row or column to a single cell in exel
I am trying to split a single cell into 2 rows can you help If I understood correctly you want to enter an entry in two lines in a cell at appropirate place hit lt+enter and again hit enter for e.g venkat (alt+enter) raman(enter) "trev" <trev@discussions.microsoft.com> wrote in message news:89B2C15C-057F-43B9-8282-37923D5EA397@microsoft.com... > I am trying to split a single cell into 2 rows can you help ...

way to delete add. fr. auto. email add. function?
Is there a way to delete old or no longer used email addresses that appear in the drop down box when I am addressing a new email? Shebubba wrote: > Is there a way to delete old or no longer used email addresses that appear in > the drop down box when I am addressing a new email? That is the nickname cache. Search and delete the .nk2 file. That's the cache for nicknames (i.e., your manually entered e-mail addresses). If you only want to delete some of them, highlight an entry and hit the delete key. If that doesn't work, use Nirsoft's NK2 Viewer utility (it e...

POS 2009 Add-In: Populating a Task Pad
I would like to create a custom application that has the ability to maintain the items that are on certain Task Pads within POS 2009. These items would all be regular menu items (ex: hamburger, hot dog, french fries, etc) and not functions. For example, if a task pad was supposed to allow the cashier quick access to daily specials, then this custom application would need to be able to clear the task pad each day and add the items for that day. Is this going to be possible? Please provide some guidance. Thank you, Sean This is a multi-part message in MIME format. ------=_NextPart_00...

copy entire contents worksheet into new workbook, link but editabl
I need to copy the entire contents of a worksheet which is used by several collegues who need to see it looking the same always (headers in the same order,etc). In the new worksheet (workbook) I will rearrange the data for other purposes. However, I will need the data to be kept up-to-date as per the source worksheet. ...

Add-in cannot be loaded OL07
Every time I open Outlook 2007 I get an error message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). It says the add-in cannot be loaded and has been disabled by Outlook. I've been getting this message ever since I uninstalled Winfax. How do I make this error stop appearing? Thanks. -- kapibarra Remove the addin from OL by using Trust Center, Addins. http://office.microsoft.com/en-us/outlook/HA100341271033.aspx#14 "kapibarra" wrote: > Every time I open Outlook 2007 I get an error > message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). ...

Format text to add character
I have two fields that should match, but one includes special characters while the other does not. Example: Field1 00ABCD123456123 Filed2 00/ABCD/123456/123/SBZ I need to find records where these two fields don't match, either by changing the display of one of them, or a query to compare Field1 character 7-15 with Field2 characters 9-14, 16-18. Hope this makes sense. Can anyone help? Thanks! Take a look at the following from the Access Help file it might be what you're looking for... Extract a part of a text value The following table lists examples of expressions that ...

Add File menu to custom toolbar
Hi All, I am trying to add the 'File" menu and "Window" menu of the Standard Toolbar to a custom toolbar but failing miserably! I think it should look something like: Sub AddMenuTitles() Application.CommandBars("MyCustomMenu").Controls.Add("File) Application.CommandBars("MyCustomMenu").Controls.Add("Window") End Sub Can anybody help please Regards Michael Sub test() AddMenuTitles True ' or false to delete End Sub Sub AddMenuTitles(bAdd As Boolean) Dim cbr As CommandBar Dim cbP As CommandBarPopup ...

add a DC in a LegSite
Hi, In the disaster recovery plan we want to create a leg site and put a DC in it. Here are some questions on how to achieve this smoothly. 1. Should I create the new site/subnet first and then promote a server in that subnet/site to DC, or should I promote a server in existing site/subnet and then move this DC to the new site/subnet? 2. When promoting a server to DC, should the server be a member server (already joined the domain) or just a workgroup member (no domain membership)? 3. The DC will be an AD-integrated DNS server. Should I install the DNS component (but not confi...

How does excel note a newline (ie new line but in same cell)
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hi <br> Have legal transcription i need to manipulate partly in excel on mac. want each cell to be one question or answer in deposition, but can't allow excel to wrap the text of the question or answer, which is typically several lines, as in depositions each line is numbered and i want to preserve the numbers matching the lines. so i would like to manually add the character/formatting in my text editor before i bring the text back into excel. <br><br>or perhaps i can write an excel macro or f...

How can I add the customer's PO# to the drop-ship Purchase Order?
Our purchasing agent would like to be able to have the customers PO# from the Sales Transaction Entry screen show up on the PO's. Is this doable in Report Writer or can it not be done? We are using GP v9.0. As I still consider myself a newbie with RW, I would appreciate detailed instructions if possible. Thank you in advance for all responses. It is not possible thru traditional table relationships in Report Writer. Let me explain: you can certainly link the Purchase Order Work table to the SOP_POLink table and the SOP_POLink table to the SOP Transactions Work table, but will...

excel add-ons
Awhile back, there was an add-on for excel that had a lot more tools. It showed on the toolbar. Somehow I lost it and I would like to get it back. It had a lot of tools like for changing case and fill ins. Any help wouyld be great. Maybe ASAP Utilities. Try a 'net search for this add-in. Gord Dibben MS Excel MVP On Sun, 22 Mar 2009 20:22:43 -0400, "kmkx70a" <kmkx70a@prodigy.net> wrote: >Awhile back, there was an add-on for excel that had a lot more tools. It >showed on the toolbar. Somehow I lost it and I would like to get it back. It >had a lot of t...

Having OL automatically add a bcc: address
My boss wants to add me as a bcc: to every email she sends. Is there a way to set this up to happen automatically? Please reply to matt@lkigroup.com Thanks much. Matt ...

Creating a new list with Last Order Date
I do have a customer transaction history. I would like to get the latest order date with amount in to another sheet instead of all the orders under same account number and bring the rest of the corresponding info to the other columns. Such as bill to information for my new sales rep. Can someone help me? Thanks Vedat A2=Customer Number B2=Order numbers C2=Order dates D2=Order Amounts D3=Bill to Name etc. A2 B2 C2 D2 CA123 1234 10/11/06 $500 CA123 2345 09/10/06 $200 CA123...

Moving Exchange 2k to new Exchange 2k server
I have an Exchange 2k server. Two hard drives (one for OS and one for data). Both are quickly running out of space and the hardware is slow. I want to upgrade my hardware (faster computer, & larger hard drives), but I want to stick with Exchange 2k for now. What is the best way to go about this? Also, in looking at the way this server was setup, I don't understand where the m:/exchange drive exists. Do all Exchange servers have a m:/exchange drive. It seems to be part of the C: drive (always has exactly the same space used as if they were mirrored) but different data. Ca...

Map Add-On?
I am looking for an Excel Chart add on so that I can take numerical data and display it on a geographic map of states or zip codes for example. Even better I could color or shade a state based on the values in my spreadsheet. Any suggestions would be appreciated. Mark ...

Formula in a form
I have a form that holds about 8 comboboxes. The comboboxes contain two choices in the dropdown, "Open" and "Closed." I would like for everytime somebody clicks on "Open," every other combobox that contains "Open" will turn to "Closed." Please provide suggestions if you know how to do this. Thanks. On Nov 15, 6:44 am, Chris J. <Chr...@discussions.microsoft.com> wrote: > I have a form that holds about 8 comboboxes. The comboboxes contain two > choices in the dropdown, "Open" and "Closed." I would like f...

New license key for upgrades from 3.0 to 4.0
Is there a process for obtaining a new license key that will be accepted during an upgrade from 3.0 to 4.0. My current 3.0 license is not being accepted! Thanks in advance, ~Maria Trial license keys are provided inthe readme that comes with the downloads. The rpocess for getting the "real" keys has not been announced. -- Matt Parks MVP - Dynamics CRM "Maria Greendyk" <MariaGreendyk@discussions.microsoft.com> wrote in message news:D5CAE82E-A779-4FFD-9D72-3E0E02D3580C@microsoft.com... Is there a process for obtaining a new license key that will be accepted d...

New mail notification #2
Is there a way to have the new mail notification box/window stay up longer than 30 seconds in Outlook 2003 like you used to be able to do in older versions of Outlook (i.e. like Outlook 2000)? I am not talking about the little envelope that appears in the task bar, but the notification box window that appears in the lower corner of the screen (used to appear right in the middle of the scree). Thanks Sounds like you're asking about the popup notification window from MSN Messenger when it detects you have new e-mails. -- ____________________________________________________________...