If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
...Relation with tables problem (continue)
I have the suspition that only in Access XP the following message appears. I
created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#2
|
|||
|
|||
...Relation with tables problem (continue)
I suspect that you are creating a new record in a "master table" form and
have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#3
|
|||
|
|||
...Relation with tables problem (continue)
Sorry but I would need a simple example of what you mean. Besides Can you
explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#4
|
|||
|
|||
...Relation with tables problem (continue)
You show me your code and I'll show you mine. How do you insert records into
both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#5
|
|||
|
|||
...Relation with tables problem (continue)
I have a form based in headmaster table and a subform based in master.
Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#6
|
|||
|
|||
...Relation with tables problem (continue)
I don't see the code for Me.Dirty = False or where varDate, varcustomerid
come from. Also what is "workdescription" in the SQL statement? What is the table or query "works"? Have you attempted to debug your code by setting a breakpoint or using debug.print to check the value of sqlstring? -- Duane Hookom MS Access MVP "kon" wrote in message ... I have a form based in headmaster table and a subform based in master. Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#7
|
|||
|
|||
...Relation with tables problem (continue)
Yes I use the debug.print and I checked the code. the string workdescription
is a field from the tables works. "Duane Hookom" wrote in message ... I don't see the code for Me.Dirty = False or where varDate, varcustomerid come from. Also what is "workdescription" in the SQL statement? What is the table or query "works"? Have you attempted to debug your code by setting a breakpoint or using debug.print to check the value of sqlstring? -- Duane Hookom MS Access MVP "kon" wrote in message ... I have a form based in headmaster table and a subform based in master. Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#8
|
|||
|
|||
...Relation with tables problem (continue)
I have the table headmaster with 2 primary keys
customerid and date Another table master with 3 primary keys customerid, date and work description The two tables have a relationship one to many connecting the 2 primary keys of headmaster with the 2 only primary keys of master. I want to use VBA code and SQL strint insert to in the master keys to fill the workdescription (3rd primary key) with records from another table. How can I do this. I used me.dirty = false in the headmaster and aftewards I tried the SQL string. Then the message appears. How can I enter data in a relationshiped tables? "kon" wrote in message ... Yes I use the debug.print and I checked the code. the string workdescription is a field from the tables works. "Duane Hookom" wrote in message ... I don't see the code for Me.Dirty = False or where varDate, varcustomerid come from. Also what is "workdescription" in the SQL statement? What is the table or query "works"? Have you attempted to debug your code by setting a breakpoint or using debug.print to check the value of sqlstring? -- Duane Hookom MS Access MVP "kon" wrote in message ... I have a form based in headmaster table and a subform based in master. Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#9
|
|||
|
|||
...Relation with tables problem (continue)
I found the problem but how can I fix it.
In the headmaster the date entered as dd/mm/yyyy witch is ok for me. Greek date format. But in the variable when I tried to create the sql string is mm/dd/yyyy. How can I change it to dd/mm/yyyy ; shall I use the format function? or do i have to check an option in Access "kon" wrote in message ... I have the table headmaster with 2 primary keys customerid and date Another table master with 3 primary keys customerid, date and work description The two tables have a relationship one to many connecting the 2 primary keys of headmaster with the 2 only primary keys of master. I want to use VBA code and SQL strint insert to in the master keys to fill the workdescription (3rd primary key) with records from another table. How can I do this. I used me.dirty = false in the headmaster and aftewards I tried the SQL string. Then the message appears. How can I enter data in a relationshiped tables? "kon" wrote in message ... Yes I use the debug.print and I checked the code. the string workdescription is a field from the tables works. "Duane Hookom" wrote in message ... I don't see the code for Me.Dirty = False or where varDate, varcustomerid come from. Also what is "workdescription" in the SQL statement? What is the table or query "works"? Have you attempted to debug your code by setting a breakpoint or using debug.print to check the value of sqlstring? -- Duane Hookom MS Access MVP "kon" wrote in message ... I have a form based in headmaster table and a subform based in master. Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
#10
|
|||
|
|||
...Relation with tables problem (continue)
I see you started another thread with this question so I won't continue this
one... -- Duane Hookom MS Access MVP "kon" wrote in message ... I found the problem but how can I fix it. In the headmaster the date entered as dd/mm/yyyy witch is ok for me. Greek date format. But in the variable when I tried to create the sql string is mm/dd/yyyy. How can I change it to dd/mm/yyyy ; shall I use the format function? or do i have to check an option in Access "kon" wrote in message ... I have the table headmaster with 2 primary keys customerid and date Another table master with 3 primary keys customerid, date and work description The two tables have a relationship one to many connecting the 2 primary keys of headmaster with the 2 only primary keys of master. I want to use VBA code and SQL strint insert to in the master keys to fill the workdescription (3rd primary key) with records from another table. How can I do this. I used me.dirty = false in the headmaster and aftewards I tried the SQL string. Then the message appears. How can I enter data in a relationshiped tables? "kon" wrote in message ... Yes I use the debug.print and I checked the code. the string workdescription is a field from the tables works. "Duane Hookom" wrote in message ... I don't see the code for Me.Dirty = False or where varDate, varcustomerid come from. Also what is "workdescription" in the SQL statement? What is the table or query "works"? Have you attempted to debug your code by setting a breakpoint or using debug.print to check the value of sqlstring? -- Duane Hookom MS Access MVP "kon" wrote in message ... I have a form based in headmaster table and a subform based in master. Headmaster and master are linked together in primary keys, datefld and customerid, where workdescription is only primary key for master also. So Headmaster has 2 primary keys and master 3. I click a button named enter and I use the me.dirty = false to save the record in Headmaster and aftewards I run that code sqlstring = "INSERT INTO master ( datefld,customerid,workdescription )SELECT #" & vardate & "#," & varcustomerid & ",workdescription FROM works" cncurrent.Execute (sqlstring) So why the first time before any changes that I made in my database worked fine and now I have that message? "Duane Hookom" wrote in message ... You show me your code and I'll show you mine. How do you insert records into both tables? -- Duane Hookom MS Access MVP -- "kon" wrote in message ... Sorry but I would need a simple example of what you mean. Besides Can you explain me why in Access 2000 when I save the file using Access 2000 I don't encounter that message ? "Duane Hookom" wrote in message ... I suspect that you are creating a new record in a "master table" form and have some process that adds a new record to a "child table". You may need to force the main record to save prior to running the process that adds the child record. -- Duane Hookom MS Access MVP -- "kon" wrote in message ... I have the suspition that only in Access XP the following message appears. I created the file in Access 2000 and when I was using access 2000 was fine. After I install Access xp then the message appear "You cannot add or change a record because a related record is required in table". Even If I save the file with Access 2000 format and run it in other computer having Access 2000 the problem appears. My old access 2000 file works fine in Access 2000 and with problems in Windows XP. I believe that nothing has to do with references. Please reply me If I am wrong or not. |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2002 : problem with tables Autofit / Fixed colum width | Daniel | Tables | 2 | August 31st, 2005 06:03 PM |
strategy for data entry in multiple tables | LAF | Using Forms | 18 | April 25th, 2005 04:04 AM |
XP problem. Linking tables to more than one mdb. HELP | cassie | General Discussion | 1 | April 13th, 2005 02:42 AM |
Problem: PPT2003 Tables & Cell Fill | David Lipetz | Powerpoint | 2 | February 19th, 2005 10:28 AM |
tables' relationship problem | Alex | Running & Setting Up Queries | 3 | June 25th, 2004 05:10 PM |