473,547 Members | 2,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datasheet view questions

I haven't developed applications in 2 years (have been doing straight
SQL Server work) and I am new to developing in Access. I know that
using the datasheet view of a form is not usually the preferred method
of end-user access, but it seems appropriate for one of the tables I'm
using.

The table contains two columns, MonthStartDate and ClinicDays. The
user needs to enter the numbers of days the clinic will be open for
each month. Generally, they enter 3 months at a time (for a quarter),
but they are allowed to enter as many as 12 months in advance. This
number of days is used later in the process for calculations.

1. When they open the form (in datasheet view), I'd like to position
them at the next month they need to enter. Can anyone tell me how to
do this?

2. They should only be allowed to enter days for future months, not
past. How can I make some of the records read-only?

3. And how can I make the MonthStartDate column read-only?

Thanks for helping!
Jana

Nov 13 '05 #1
1 2104
Suggest you use a continuous form rather than a datasheet

Set the Allow Additions and Allow deletions to "No"
Set MonthStartDate Locked to True

Add the following code

Private Sub ClinicDays_Befo reUpdate(Cancel As Integer)

' Stops alteration of ClinicDays on any day before today

If MonthStartdate < Date Then
MsgBox "You cant change old data", vbCritical
Cancel = True
SendKeys "{ESC}"
End If

End Sub

Private Sub Form_Open(Cance l As Integer)
' Goes to the first record where ClinicDays = 0

DoCmd.GoToContr ol "ClinicDays "
DoCmd.FindRecor d 0

End Sub

<js***@virginia .edu> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
I haven't developed applications in 2 years (have been doing straight
SQL Server work) and I am new to developing in Access. I know that
using the datasheet view of a form is not usually the preferred method
of end-user access, but it seems appropriate for one of the tables I'm
using.

The table contains two columns, MonthStartDate and ClinicDays. The
user needs to enter the numbers of days the clinic will be open for
each month. Generally, they enter 3 months at a time (for a quarter),
but they are allowed to enter as many as 12 months in advance. This
number of days is used later in the process for calculations.

1. When they open the form (in datasheet view), I'd like to position
them at the next month they need to enter. Can anyone tell me how to
do this?

2. They should only be allowed to enter days for future months, not
past. How can I make some of the records read-only?

3. And how can I make the MonthStartDate column read-only?

Thanks for helping!
Jana

Nov 13 '05 #2

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

Similar topics

3
6409
by: Keith Wilby | last post by:
I have a form which allows both form and datasheet views. My question is, is it possible to control the field (column) names in datasheet view? What happens at the moment is that the name is taken from a control's label if there is one, and if not, the control's name is used. This is confusing for my users so I'd like to be able to use...
3
3556
by: Kent Eilers | last post by:
I want to follow naming conventions for my controls - i usually prefix combo boxes with "cbo". When a form is in datasheet view however i do not want the user to see the 'cbo' prefix in front of the field name. Is there a way to retain this nomenclature and yet have the view display the field name (or anyname i want for that matter)? ...
2
3486
by: Georges Heinesch | last post by:
Hi: I have a tables in relationship to each other. When I open the main table (table 1), I see a "+" at the very left of every record. Clicking on the "+" expands the data of the linked table (table 2). Now ... when I create a form from table 1, I didn't manage show these 2 tables the same way (with the "+" at the left side of every...
13
3589
by: Aladdin | last post by:
I have an MS Access form on which I have a listbox listing tables in that database. I want to be able to click on any of those tables and view its contents on the same form using subforms or any grid control. I tried many grid controls (DBGrid, DataGrid, MSFlexGrid), the ADO Data Control and everything I can think of, with no success. Here...
1
2959
by: Yuki | last post by:
I am trying to find out if I can have a specific record that has been selected in a list box be opened in datasheet view. I can't seem to find where this can happen or what I need to use to make it happen? Does anyone have any ideas? My list box is currently tied to an option group so that they can sort the list box in order of how they want...
1
2825
by: sasan3 | last post by:
when I set visible=false, then entry is not visible in form view, but still shows up in datasheet view. How do I make a field not to show based on some condition in datasheet view? Tx.
5
3475
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record the cursor was on in the datasheet at the time I executed the macro. So, the questions are: 1) In the macro, how to I get my hands on the record...
3
2811
by: Bface | last post by:
Hello, I tried looking through some of the postings to see if anyone asked these questions before but I didn’t find any. I have 3 questions and I hope someone can help me out. I will write post them separately so it’s not that long. First I have a main form which is pulling its data from . On this form I created a command button on the form...
2
3139
by: Alan Forsyth | last post by:
That rather long subject says it. In Access97 running on XP - I want to display a Maximized size Form01, then open a Restore size Datasheet View Form02 on top of the first Form. PopUp won't give me Datasheet view. Dialog mode won't give me Datasheet view I could make Form01 Restore size and expand it to fill the Window in Restore size...
0
7703
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7463
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6032
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5081
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3493
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1923
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 we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
748
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.