Hi all
Im using the following on an ms access form. (the control source of chkSameShip is a yes/no field in the Database)
Private Sub chkSameShip_Click()
If Me![chkShipSame] = True Then
Me![LastNameShip] = Me![LastName]
Me![FirstNameShip] = Me![FirstName]
Me![AddressShip] = Me![Address]
Me![DistrictShip] = Me![District]
Me![CityShip] = Me![City]
Me![CountyShip] = Me![County]
Me![CountryShip] = Me![Country]
Me![PostcodeShip] = Me![Postcode]
Me![LastNameShip].Enabled = False
Me![FirstNameShip].Enabled = False
Me![AddressShip].Enabled = False
Me![DistrictShip].Enabled = False
Me![CityShip].Enabled = False
Me![CountyShip].Enabled = False
Me![CountryShip].Enabled = False
Me![PostcodeShip].Enabled = False
End If
If Me![chkShipSame] = False Then
Me![LastNameShip].Enabled = True
Me![FirstNameShip].Enabled = True
Me![AddressShip].Enabled = True
Me![DistrictShip].Enabled = True
Me![CityShip].Enabled = True
Me![CountyShip].Enabled = True
Me![CountryShip].Enabled = True
Me![PostcodeShip].Enabled = True
End If
End Sub
Basically the form lists the users name and address, if you check the box then it copies these details into the "Ship to" fields because the ship to address would be the same as the invoice address. It then disables the ship to fields to that you cant edit them However, it works but if I then scroll to the next record then the fields remain disabled even though the checkbox is not checked. i think i need to change the "Private Sub chkSameShip_Click()" because i need it to work even if you dont click on the checkbox?
Please help!