473,498 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data in a form is not refreshing

32 New Member
Access 2003
I have a FORM1 which I use to list inventory of devices.
FORM1 gets its data from TABLE1.

I have a button in Form1 which opens up FORM1EDIT - this form allows you to Add records to TABLE1.

After succesfully adding a NEW record to TABLE1, FORM1 does not get updated.

I added a command button to FORM1EDIT which I called "Save and Exit", at the end of the close function, I added a statement
" DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70"

It doesnt refresh Form1.
I also tried adding a command button on FORM1 to refresh, and that doesnt work either.

Please help
May 21 '07 #1
6 2513
missinglinq
3,532 Recognized Expert Specialist
If Form1stays open while you're entering data in Form1Edit, you need to add a line to your button on Form1 after you open Form1Edit:

Me.Requery
May 21 '07 #2
puppydogbuddy
1,923 Recognized Expert Top Contributor
[font=Times New Roman][size=3]Replace[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]With either:[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]DoCmd.RunCommand acCmdSaveRecord[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]Or[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]Me.Dirty = False[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]The DoMenuItem syntax was eliminated from Access versions 2000 and higher.[/size][/font]
May 21 '07 #3
missinglinq
3,532 Recognized Expert Specialist
Not true, PuppyDogBuddy! Syntax such as

Expand|Select|Wrap|Line Numbers
  1.  DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
is still supported in Access 2000 and is, in fact, still used for all Wizard created command buttons. Having said that, I agree it should be avoided when possible.
May 21 '07 #4
puppydogbuddy
1,923 Recognized Expert Top Contributor
Not true, PuppyDogBuddy! Syntax such as

Expand|Select|Wrap|Line Numbers
  1.  DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
is still supported in Access 2000 and is, in fact, still used for all Wizard created command buttons. Having said that, I agree it should be avoided when possible.
[font=Times New Roman][size=3]You are correct with regards to VBA procedures. It applies to macros (see below). Sorry for the confusion.[/size][/font]

[size=3][font=Times New Roman] [/font][/size]

[font=Times New Roman][size=3]From Access on-line Help:[/size][/font]

[size=3][font=Times New Roman]The DoMenuItem Action[/font][/size]

[font=Times New Roman][size=3]The DoMenuItem action is no longer used in Microsoft Access 2000. The new [/size][/font][font=Times New Roman][size=3][color=#0000ff]RunCommand[/color][/size][/font][size=3][font=Times New Roman] action can be used to accomplish the tasks for which you used to use the DoMenuItem action.[/font][/size]

[font=Times New Roman][size=3]When you [/size][/font][font=Times New Roman][size=3][color=#0000ff]enable[/color][/size][/font][size=3][font=Times New Roman] a database created with a prior version of Microsoft Access, the DoMenuItem action will continue to work as it did before.[/font][/size]

[font='Times New Roman']When you convert a database created with a prior version of Microsoft Access, all DoMenuItem actions in macros are replaced with RunCommand actions the first time that the macros are saved after conversion. DoMenuItem methods used in Visual Basic procedures aren't changed.[/font]
May 21 '07 #5
NewtoAccess
32 New Member
If Form1stays open while you're entering data in Form1Edit, you need to add a line to your button on Form1 after you open Form1Edit:

Me.Requery
That command worked. Thanks!
May 23 '07 #6
missinglinq
3,532 Recognized Expert Specialist
Glad we could help! ;0)>
May 23 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
292
by: Wayne Aprato | last post by:
I have a form (Form1)that is based on a query. A button on this form opens another form (Form2) into which I enter data that in turn changes the data on the first form. When I close the second form...
2
1909
by: Shannon Rotz | last post by:
I have a function in a Microsoft Access module (below) which creates a Word XP Mailmerge document, drawing the data from Access XP. I can get the connection to work fine. However, when I create...
2
1870
by: Wysiwyg | last post by:
I was hoping to get some opinions on the efficiency of various methods of reusing the same dropdown list data. Here is the situation: Multiple panels on maintenance pages with TAB menus across...
1
2294
by: Angus Lepper | last post by:
I'm writing a stock ticker for a stock market simulation, and can load the data into the xmlreader in the first place, but can't figure out how to refresh/update the data in it. Any ideas? Code:...
27
12992
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
15
33216
by: tmax | last post by:
PHP Pros: I have a simple html form that submits data to a php script, which processes it, and then redisplays the same page, but with a "thank you" message in place of the html form. This is...
7
2284
ADezii
by: ADezii | last post by:
I am experiencing an extremely peculiar problem, which occurred immediately after converting a self-contained Access 2003 database to a Front/Back End architecture. When I enter a specific field ()...
1
1303
ADezii
by: ADezii | last post by:
I am experiencing an extremely peculiar problem, which occurred immediately after converting a self-contained Access 2003 database to a Front/Back End architecture. When I enter a specific field ()...
2
3696
by: AJang | last post by:
My windows form "Form1" has one Button "button1" and one TextBox "textBox1". When I click button1, it do a job for each file in a directory. The job include some platform invoke call. Before...
8
3901
by: ninuhadida | last post by:
hi there! This is actually my first post over here.. I thought i'd register since most answers to my common problems that i google up turn up to be in this site.. however I have a problem myself now....
0
7167
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
7208
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...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5464
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,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.